I set up a empty git repo on my production server with
git init --bareFrom my local machine i added the repo as a remote:
git remote add origin ssh://user@If i issue following command
git remote show originI get an error message saying:
fatal: '~/git/example.com' 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 tried the colon as mentioned here, but it didn't help.
23 Answers
With SSH URLs, relative paths start from your home directory, and it doesn't understand shell shortcuts like ~. So do:
git remote add origin ssh://user@if you want to use absolute paths, like /home/mario/git/example.com, use an extra leading slash:
git remote add origin ssh://user@ 1 This means that the remote server does not have a repo at ~/git/example.com I suspect you have the address wrong. Most git addresses will be something like :project.git. Most do not have a path or a reference to ~
I have the answer to my own problem...
I am using the URL conventions used in this post
The Domain i was using was just defined in my local hosts file. Which seems to work with everything else, accept for git.
I then replaced the example.com part with the actual Server IP and got it working.