-
Notifications
You must be signed in to change notification settings - Fork 926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Clone another private repo from the same GitHub Organization #10
Comments
I'm having a similar issue but it results in a different message. I'm having a pipeline for SOME_PRIVATE_REPO that uses code from OTHER_PRIVATE_REPO within the same organization ORG. Azure Pipelines is enabled and is aware of both repositories (in settings in github). Here's a snippet of the - script: |
cd some_dir
git clone https://github.com/ORG/OTHER_PRIVATE_REPO.git
cd OTHER_PRIVATE_REPO
git checkout v1
pip install -e .
displayName: 'Install OTHER_PRIVATE_REPO from tagged commit' So, the job just hangs at the stage of I tried googling but couldn't find how to access other private github repo inside a pipeline for a private github repo. Does anybody know? |
I've found a solution that I don't like but it works. In the pipelines editor on azure devops, go to variables section, and create a secret variable with a github access token in it. Then, refer to it in the Resulting snippet from my yml file: - script: |
cd some_dir
git clone https://x-access-token:$(astafan8-github-access-token)@github.com/ORG/OTHER_PRIVATE_REPO.git
cd OTHER_PRIVATE_REPO
git checkout v1
pip install -e .
displayName: 'Install OTHER_PRIVATE_REPO from tagged commit' The |
Having the exact same issue. I agree with @astafan8 - I don't like the solution with the secret and the access token. Ideally it should support multiple the build pipeline should support checkout tasks. I think it relates to this User Voice request |
Any progress on this front? |
In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community. Sorry for any confusion resulting from this move. |
Moved into Developer Community: https://developercommunity.visualstudio.com/content/problem/1007491/unable-to-clone-another-private-repo-from-the-same.html |
@DominicCabral: |
I am currently running into an issue where I am able to pull from one private GitHub source in the
checkout
stage but unable to pull another private GitHub source from a script later in the pipeline due to lack of access rights. Note: Both Repos are a part of the same organization. And I've already connected the Azure App to GitHub with access to all ReposWithin my checkout stage I've explicitly set
persistCredentials: true
This, as I understand it, should allow the following scripts in the pipeline to use the GitHub credentials that were used in the checkout for "Get Sources".Here is an example of the script that fails:
And the output:
The text was updated successfully, but these errors were encountered: