Skip to content

Avoiding password prompt for Github repositories #1

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

Open
midenok opened this issue Nov 14, 2013 · 0 comments
Open

Avoiding password prompt for Github repositories #1

midenok opened this issue Nov 14, 2013 · 0 comments
Labels

Comments

@midenok
Copy link
Member

midenok commented Nov 14, 2013

  1. Generate SSH keypair and put public key to your Github account (instructions)
    Note: don't hassle with xclip, just open file in text editor and copy contents to clipboard!
  2. Add your private key to agent:
user:~$ ssh-add .ssh/github.rsa
Identity added: .ssh/github.rsa (.ssh/github.rsa)
  1. Use SSH URLs instead of HTTPS:

pic

To fix existing local Git repository to use SSH proto:

git remote set-url origin git@github.com:<orgname>/<repo>.git

Note: don't mistake <orgname> for your account name!

To look for current remote setting:
user:git$ git remote show origin
* remote origin
  Fetch URL: git@github.com:learn-it/git.git
  Push  URL: git@github.com:learn-it/git.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

More info...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant