Permission denied on GitHub….
Today I’m creating my first open source project, actually it’s not my first, but this is the first that I’m opening in GitHub.
After following the GitHub instructions:
and some instructions about to create the ssh credentials:
and
I have got a mysterious: “Permission denied” message on the git push origin master command:
So, the way that I found to solve that was, after all the git commands and ssh-keygen done, was:
After following the GitHub instructions:
$ mkdir stage $ cd stage $ git init $ touch README $ git add README $ git commit -m 'first commit' $ git remote add origin git@github.com:mangar/breshop.git $ git push origin master
and some instructions about to create the ssh credentials:
[~]$ cd .ssh [~/.ssh]$ ls config id_rsa.pub id_rsa known_hosts
and
[~/.ssh]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/tom/.ssh/id_rsa): <enter> Enter passphrase (empty for no passphrase): <enter> Enter same passphrase again: <enter> Your identification has been saved in /Users/tom/.ssh/id_rsa. Your public key has been saved in /Users/tom/.ssh/id_rsa.pub. The key fingerprint is: 50:43:77:c6:97:af:61:82:dc:ea:9b:6b:67:d4:1b:61 tom@volcano</enter></enter></enter>
I have got a mysterious: “Permission denied” message on the git push origin master command:
Permission denied (publickey). fatal: The remote end hung up unexpectedly error: failed to push to 'git@github.com:mangar/breshop.git'
So, the way that I found to solve that was, after all the git commands and ssh-keygen done, was:
- Get the fingerprint generated by ssh-keygen command by doing: cat mangar.pub | pbcopy (mangar was the name that I put into the first question of the ssh-keygen command)
- Open on the browser: github > account, click on “add another public key” link and paste the contend copied by the pbcopy on the textbox.
- Save it
- Back to the command line into .ssh dir type: ssh-add
Finish! now you are ready to push your very first README file into GitHub!
Jeff Schwab
10 May 09 at 10:42 am