Clone repository using a Github app #150402
Replies: 1 comment
-
Correct way to clone using a GitHub AppStep 1 — Generate an Installation Access Token Call: You will receive a JSON response like: This “token” is the only token that Git can use. Step 2 — Clone using the installation token Example: Why your command failed A client secret is never valid for Git, and GitHub will reject it as “Invalid username or password”. Option A: Option B (not recommended / insecure): But this cannot be done for a GitHub App. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hello,
How can I clone a git repository using git and authenticate via a Github app. I also need my authentication token to have no expiry set.
Here is what I have done so far:
Repository > ContentspermissionWhen I try to use
git clone https://x-access-token:TOKEN@github.com/owner/repo.gitto clone my repository, as describe here https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/choosing-permissions-for-a-github-app#choosing-permissions-for-git-accessI get the following error:
Beta Was this translation helpful? Give feedback.
All reactions