Question

I am having a weird issue, but I guess I didn't configure well my setup.

I have a server running a gitolite server on Ubuntu. And I am using both MacOS and Windows on my workstation.

On MacOS no issue at all I can us git clone git://IP/repo.git and get the clone of the repo.

But on Windows I installed the latest version of msysgit 1.9 and TortoiseGit.
I create a key-pair with the git bash, and add it manually in my server.
During installs of Git and TortoiseGit, I may have messed up something like I didn't chose the good configuration firstly. I fixed it after. I mean I chose plink as ssh, and now I have reset it to the openssh included in git.

So the thing is I can do ssh git@IP and get a good answer with all of my repos.
But if I do git clone `git://IP/repo.git, I have an access error:

fatal: remote error: access denied or repository not exported.

However if I do git clone ssh://git@IP/repo.git it works I can clone.

So I am wondering why I can't just use git:// and have to use ssh:// ? Is it normal ? Any guess or clues ? Which files should I inspect ?

Was it helpful?

Solution

git:// isn't the same as git@server:repo.

  • The first one is the git protocol, using by default the port 9418.
    It would require a git daemon to run on the server, and for a git-daemon-export-ok file to exist on the server (in each bare repos) in order for those repos to be "exported".
  • The second one is the ssh protocol, using a public-private keys.

Try cloning with the second syntax.

As long as you are using the first, no amount of ssh key generation won't change the fact that those keys won't be used at all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top