Reputation: 1525
So, I was working on some code, and decided to create a git server on my NAS device to keep my repositories.
So on my nas device I created a folder, and did a "bare" git init. No problem so far.
Then I added this server as a remote and did the initial push:
git remote add origin ssh://jeroen@nas/volume1/homes/jeroen/git-repos/pymania.git
git push origin master
Counting objects: 68, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (53/53), done.
Writing objects: 100% (68/68), 40.97 KiB | 0 bytes/s, done.
Total 68 (delta 15), reused 0 (delta 0)
To ssh://jeroen@nas/volume1/homes/jeroen/git-repos/pymania.git
* [new branch] master -> master
So far so good right? Nope, not really !
I created to try the clone this repository, and this is what I get:
git clone pymania ssh://jeroen@nas/volume1/homes/jeroen/git-repos/pymania.git
fatal: repository 'pymania' does not exist
Can someone please explain this me? I can see that the folder exists on the git server, My development machine can push to the server just fine, so why can't I just do a simple clone operation ?! The server-name is correct, the folder location is correct, my username and password are correct, so I don't see why git complains.
Upvotes: 0
Views: 108
Reputation: 27295
Yes your clone path is wrong. Change the direction of your parameters.
Its:
git clone sourpath destination
In your case:
git clone ssh://jeroen@nas/volume1/homes/jeroen/git-repos/pymania.git pymania/
If you leave the second parameter blank git create a folder with the repository name without the .git
extension.
Upvotes: 2