Reputation: 337
Here is what I did so far (in SourceTree):
Now I get an error:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
Pushing to ssh://[email protected]:22/srv/git/hallo
fatal: '/srv/git/hallo' does not appear to be a git repository
fatal: Could not read from remote repository.
I am working with a a dozen of other repositiories without any difficulties on that server. So it can't be an access or ssh problem. I also double checked the ip address of the server.
If I start the terminal and write "git remote -v" I get:
origin ssh://[email protected]:22/srv/git/hallo (fetch)
origin ssh://[email protected]:22/srv/git/hallo (push)
If I try to push ("git push origin master") I get:
fatal: '/srv/git/hallo' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I have no clue what I'm missing. Can you help?
Upvotes: 1
Views: 5982
Reputation: 1330072
No, I didn't. Do I have to? I thought pushing a commit will do this for me.
Yes you should create a remote repo first.
Connect to ssh://[email protected]:22, and create a bare repo:
cd /srv/git/
git init --bare hallo
Upvotes: 1