Skip to content

Instantly share code, notes, and snippets.

@adong
Created November 11, 2019 05:33
Show Gist options
  • Save adong/35644eb731932f606b37be8e371710f4 to your computer and use it in GitHub Desktop.
Save adong/35644eb731932f606b37be8e371710f4 to your computer and use it in GitHub Desktop.
set git account rather than default

Setting up github ssh

git clone your-git-repo

After ssh-keygen and add to your github

Host github_adong
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/adong_github_rsa
git remote remove origin
git remote add origin git@github_adong:org/repo.git
git remote -v

After that, now you can push git push -u origin head

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