March 18, 2017

 

git ssh correct url

If you are like me using personal server to store GIT repos you may have the error like this during first pull/clone considering you have project initialized in your remote home with command $ git init --bare reponame.git
$ git clone ssh://servername/reponame.git 
Cloning into 'reponame'...
fatal: '/reponame.git' 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.
The solution is to use slightly different URL, note part '~/':
$ git clone ssh://vm/~/devvit_test.git

Labels:

This page is powered by Blogger. Isn't yours?