-1
Administrator@SANZVAIO /e/projects/pySan (master)
$ git remote add pySan git@github.com:sanfx/.git

Administrator@SANZVAIO /e/projects/pySan (master)
$ git push -u origin master
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Any other way to push to github? I am using Git Bash on Windows 7.

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
  • possible duplicate of http://stackoverflow.com/questions/8402281/github-push-error-permission-denied and/or http://stackoverflow.com/questions/5026796/git-repositiory-adding-files – Nevik Rehnel Mar 09 '13 at 07:39
  • 1
    Have you uploaded your [ssh key to github](https://help.github.com/articles/generating-ssh-keys)? – Srikanth Venugopalan Mar 09 '13 at 07:43
  • yes srikanth, this fix the problem, but now i am getting this `$ git push git@github.com:sanfx/pySan.git Enter passphrase for key '/e/Users/Administrator/.ssh/id_rsa': To git@github.com:sanfx/pySan.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:sanfx/pySan.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: See the 'Note about fast-forwards' in 'git push --help' for details.` – Ciasto piekarz Mar 09 '13 at 07:57
  • 1
    It's just that: Your local branch is "behind" the remote branch, so you cannot push until you pull (update) your local branch. Git is a very powerful tool, that actually enhances your development. Please read this excellent guide on Git: http://git-scm.com/book/en – Sami N Mar 09 '13 at 08:48

1 Answers1

2
  1. You repo URL is wrong
  2. You might also have an SSH issue.

You should first create an empty repository on GitHub, via the webinterface or the GitHub API

Let's suppose you have just created myrepo, the URL syntax to use is:

git remote add pySan git@github.com:sanfx/myrepo.git

If you still have SSH errors, either check your public/private keypair, or use https to start out:

git remote set-url pySan https://github.com/sanfx/myrepo.git
Sébastien Dawans
  • 4,537
  • 1
  • 20
  • 29
  • anyway i figured it out , first i had to set up the SSH key correctly for this windows login, then I had to use this command `git push -f origin ` and I am on path to be gitorious... – Ciasto piekarz Mar 09 '13 at 08:47