Skip to content

Cloning private repo with a Github App private key #24575

Discussion options

You must be logged in to vote

Did you find a solution?

I am trying to clone private repositories with my Github App aswell.

I just found a way that works for me using the command line.

https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/ at the very bottom

git clone https://x-access-token:<token>@github.com/owner/repo.git

I am retrieving a user token using a POST request to https://api.github.com/app/installations/$installationId/access_tokens.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@joeblubaugh
Comment options

@joshuamurari-Contoso-MCAPS
@btello
Comment options

@smeeklai
Comment options

@daviewales
Comment options

Answer selected
Comment options

You must be logged in to vote
1 reply
@saarw-opti
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment