Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save abdulwahidgul24085/5473f6e2007cb9d2fe23f37ea857a5a8 to your computer and use it in GitHub Desktop.
Save abdulwahidgul24085/5473f6e2007cb9d2fe23f37ea857a5a8 to your computer and use it in GitHub Desktop.
Github AccessToken Another Account
token: github-oauth-token
username: github-username
email: github-email
get repo name
https://github.com/<username>/<repo>.git
clone the repo with the token in the URL
git clone https://<token>@github.com/<username>/<repo>.git
set the name of the contributor
git config --local user.email "<email>"
git config --local user.name "<username>"
set the remote url with the following pattern
git remote set-url origin https://<username>:<token>@github.com/<username>/<repo>.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment