0

I set up my SSH keys as directed here: https://help.github.com/articles/generating-ssh-keys

But still git asks for username and password when I do

git push origin master.

Am I missing something?

  • 1
    This is probably a better question for Github support, honestly. – coreyward Sep 05 '13 at 15:49
  • 1
    [Why is Git always asking for my password?](https://help.github.com/articles/why-is-git-always-asking-for-my-password) –  Sep 05 '13 at 15:50
  • Oh I should mention. I am setting up the SSH keys on my second MacBook. It worked perfectly fine on my first MacBook – Mohamed El Mahallawy Sep 05 '13 at 15:51
  • execute `git remote -v`, if you're seeing `https://` in the urls, the links above will help you. otherwise, it's most likely an issue with your keys –  Sep 05 '13 at 15:53
  • How can I set it such that when I init a repo it uses SSH instead? – Mohamed El Mahallawy Sep 05 '13 at 15:55
  • `git remote set-url origin git@github.com:username/repo.git` to change the `origin` of an existing repo or `git remote add origin ` to add a new `origin` remote –  Sep 05 '13 at 15:57
  • @MohamedElMahallawy don't clone using an `https` url. Also, if your private key is encrypted with a passphrase, you'll still need to enter your password to decrypt it, unless you use you use [ssh-agent to save your password for a console session](http://stackoverflow.com/questions/6565357/git-push-requires-username-and-password/18348125#18348125), or if your MacBook has some sort of password key-chain. –  Sep 05 '13 at 22:12

0 Answers0