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 M
  • 18,506
  • 3
  • 48
  • 56
Timo
  • 2,922
  • 3
  • 29
  • 28

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
1

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
1

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
  • 26,944
  • 4
  • 67
  • 72
  • I think this remote format is wrong, correct is `https://github.com/bakkdoor/grit (fetch)`, [see](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) – Timo Feb 06 '22 at 18:08
1

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
  • 639
  • 7
  • 10
1

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,262,500
  • 529
  • 4,410
  • 5,250