-1

I am running the following script to set up a git repository on GitHub:

Global setup:
  git config --global user.name "Your Name"
  git config --global user.email email_id@email.com

Next steps:
  mkdir MultiView
  cd MultiView
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin https://github.com/nalgene/MultiView.git
  git push -u origin master

The last line git push -u origin master or git push origin master for that matter returns an error:

fatal: https://github.com/naglene/MultiView.git/info/refs not found: did you run git update-server-info on the server?

I researched the issue and it seems the most likely reason is a typo (case sensitive) but I made sure that is not an issue. I used git remote -v to check the origin is correct. What else can be the issue?

Morgan G
  • 595
  • 1
  • 5
  • 19
zar
  • 11,361
  • 14
  • 96
  • 178

3 Answers3

5

You have to carefully look after your spelling. According to Github's guide, your username is nalgene, hence the URL is https://github.com/nalgene/MultiView.git. The error message hints that you added the remote as https://github.com/naglene/MultiView.git which is not the same username, as you swapped the l and g.

Also, the default branch is called master, not maaster or mater.

Holger Just
  • 52,918
  • 14
  • 115
  • 123
  • You are right, I was never sure if user.name must be the same as my login to gitup. The doucmentation says the email at least is very lax and it can be anything (not even real). I made sure though and ran the scrip with the correct login but still same result. – zar Jun 19 '12 at 17:42
  • +1 for the point about careful spelling. I recently changed two letters in my username to be uppercase instead of lowercase, and Github was giving me that fatal error. – Jake Stoeffler Oct 09 '12 at 01:34
0

With Github, you must first make sure that you've made the repository on github itself before trying to push to it from your side. See this answer: https://stackoverflow.com/a/12407847/735614

Did you make the repo there? Or are you only making it on your side and trying to create it on the server by pushing?

Community
  • 1
  • 1
Nato Saichek
  • 305
  • 1
  • 3
  • 14
0

This is almost too obvious to mention, but this can also happen if you forget to create a new repository on Github before running git push.

cobra libre
  • 844
  • 9
  • 6