Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-settings.php on line 399

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-settings.php on line 414

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-settings.php on line 421

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-settings.php on line 456

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 593

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/mangar.com.br/blogv3/wp-includes/classes.php on line 710

Strict Standards: Redefining already defined constructor for class wpdb in /home/mangar.com.br/blogv3/wp-includes/wp-db.php on line 58

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-includes/cache.php on line 99

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/mangar.com.br/blogv3/wp-includes/cache.php on line 404

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/mangar.com.br/blogv3/wp-includes/theme.php on line 576

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method Add_to_Any_Subscribe_Widget::init() should not be called statically in /home/mangar.com.br/blogv3/wp-includes/plugin.php on line 311

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GoogleSitemapGeneratorLoader::Enable() should not be called statically in /home/mangar.com.br/blogv3/wp-includes/plugin.php on line 311

Deprecated: Function eregi() is deprecated in /home/mangar.com.br/blogv3/wp-content/plugins/wp-statpress/statpress.php on line 1139

Deprecated: Function eregi() is deprecated in /home/mangar.com.br/blogv3/wp-content/plugins/wp-statpress/statpress.php on line 1140

Deprecated: Function eregi() is deprecated in /home/mangar.com.br/blogv3/wp-content/plugins/wp-statpress/statpress.php on line 1141

Deprecated: Function eregi() is deprecated in /home/mangar.com.br/blogv3/wp-content/plugins/wp-statpress/statpress.php on line 1142

Deprecated: Function ereg() is deprecated in /home/mangar.com.br/blogv3/wp-content/plugins/wp-statpress/statpress.php on line 979
Permission denied on GitHub…. at Marcio Garcia

Marcio Garcia

Software Empowerment²

Permission denied on GitHub….

with one comment

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:

$ 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:

  1. 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)
  2. Open on the browser: github > account, click on “add another public key” link and paste the contend copied by the pbcopy on the textbox.
  3. Save it
  4. Back to the command line into .ssh dir type: ssh-add
  5. Finish! now you are ready to push your very first README file into GitHub!

Written by Marcio

October 8th, 2008 at 11:26 pm

Posted in Git, GitHub

Tagged with ,

One Response to 'Permission denied on GitHub….'

Subscribe to comments with RSS or TrackBack to 'Permission denied on GitHub….'.

  1. Thank you, sir.

    Jeff Schwab

    10 May 09 at 10:42 am

Leave a Reply