2

I am new to GitHub, but I have followed the steps to create a repo:

$ mkdir fb
$ cd fb 
$ git init 
$ git add README 
$ git commit -m 'first commit'
$ git push origin master

Now when I try to make my first commit, I get the follwowing error:

$ git push origin master
error: Cannot access URL https://github.com/xxx/yyy/, return code 60
error: failed to push some refs to 'https://github.com/xxx/yyy'

I am using the latest git version. Why does GitHub throw this unusal error and how do I fix it?

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
Vivek S
  • 5,384
  • 8
  • 51
  • 72

2 Answers2

4

What if you try using the SSH protocol for the git repository, e.g. git@github.com:xxx/yyy.git, and see if that works for you?

$ git remote rm origin

$ git remote add origin git@github.com:xxx/yyy.git

Colin R
  • 17,711
  • 2
  • 20
  • 28
cbeer
  • 1,221
  • 10
  • 13
  • The SSH url should read `git@github.com:xxx/yyy.git`. Note the colon between `git@github.com` and the repository information. Using a `/` will result in a fatal error. – Colin R Sep 18 '12 at 15:59
  • Prefer `git remote set-url`. – Fred Foo Aug 15 '13 at 08:37
-1

I believe that return error code has something to do with the SSL Certificate... I'm sorry I cannot help further.

Zerkz
  • 686
  • 1
  • 6
  • 25
  • Since this isn't an answer, but more of a suggestion in where the problem may lie, this would be more appropriate as a comment to the question. – Colin R Sep 18 '12 at 15:50