1

I want to create a repo, but I failed. Here are my steps:

mkdir ~/Hello-World
cd ~/Hello-World
git init
touch README
git add README
git commit -m 'first commit'  --> 1 file changed, 1 insertion
git push origin master

I am asked for my password and username, which I entered.

fatal :https://github.com/timokoerner/Hello-World.git/info/refs?service=git-receive-pack not found; did you run git update server info

I have git version 1.8. Any help?

James McLaughlin
  • 18,363
  • 2
  • 45
  • 56
Timo
  • 2,008
  • 3
  • 19
  • 23

5 Answers5

1

Personally, I've never had a problem with creating an initial repo on Github.

Try going here and filling out the necessary fields:

Create Github Repo

Once that's done, you can use git clone to create a local instance of the repo. From there, you can push and pull from it like a normal repository.

Tosen
  • 166
  • 4
  • I tried the create Repo, entered `git remote add origin https://github.com/timokoerner/Xing.git`, I got the msg: fatal - remote origin already exists. After `git push` I receive the same message as above. I changed my pwd, so it should not be the problem. Any idea ? – Timo Jan 05 '13 at 13:00
  • I would recommend deleting your local repo and retrying `git clone`. – Tosen Jan 08 '13 at 03:24
0

You typed a wrong Username or Password.

  • User-Name or should be ok, because updating the file in an existing repo with `git commit -a ` and then `git push` works well, because I am asked to enter these two. – Timo Jan 05 '13 at 15:10
0

Did you enter your GitHub username and GitHub password?

You can also edit the remote so it points to https://timokoerner@github.com/timokoerner/Xing.git. That will just prompt you for your (GitHub) password in that case.

Ian Stapleton Cordasco
  • 20,880
  • 4
  • 61
  • 69
0

The "-u" is necessary.

git init

Create a .gitignore file in include all files and directories that you don't want to commit

git add . //add all files to local git

git status -a / show all files that are modified or added

git remote add origin git@github.com:USER/REPO.git

git push -u origin master

Anderson Lopes
  • 599
  • 6
  • 10
0

You can:

  • replace your current remote named origin with the name of an existing GitHub repo

    git remote set-url origin https://github.com/timokoerner/Xing.git
    
  • try a git push -u origin master for your first push.
    See "Why do I need to explicitly push a new branch?".
    After that first push, other commits can be publised with a single 'git push'.

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283