1

I have a public repo on a server (apache), I can clone it with SSH from local with :

$ git clone user@myserver:public_html/repo

But the same repo can't be cloned with http :

$ git clone http://myserver/repo 
// fatal: repository 'http://myserver/repo' not found

With a browser I can see the content of my repo when entering (userdir mod is activated and set to be document root) :

http://myserver/repo

and the associated git folder with

http://myserver/repo/.git

I set the folder permission to 755.

What am I doing wrong ?

2
  • Which git server are you using? Just be exposing the git repository/files over http(s) is not enough to make it work over http. Commented Oct 19, 2015 at 11:09
  • Have you tried Git HTTP Smart Device? Or if it falls back to Dumb HTTP put a bare Git repository under your HTTP document root and set up a specific post-update hook, and you’re done. Commented Oct 19, 2015 at 13:40

1 Answer 1

1

Try this:

git clone https://[email protected]/repo/.git

or the insecure version:

git clone https://username:[email protected]/repo/.git

Also make sure you are using the latest version of Git.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.