Reputation: 71
I'm trying to create a git "server" with Apache using HTTPS protocol. For that I've created created an alias pointing the directory "git". Then in this directory I have multiple folders, one for each user, protected by htaccess
& htpasswd
for authentication, and finally one folder per repositories of each user. So I'm supposed to access to my repos with links of that form:
https: //localhost/git/user/repo.git
I then followed this tutorial : http://www.it-connect.fr/mettre-en-place-une-connexion-ssl-avec-wamp%EF%BB%BF/ to enable HTTPS.
But when I try to clone one of my repos, by doing:
git clone https: //user:pass@localhost/git/user/repo.git
it returns the message:
fatal: unable to access 'https: //user:pass@localhost/git/user/repo.git': The requested URL returned error : 501
.
I watched to the ssl access & error logs to understand why and it seems that somewhere it request are modifies because instead of a typical GET request I have :
[Sat Jul 19 13:05:36.794602 2014] [core:error] [pid 8572:tid 1580] [client 127.0.0.1:59226] AH00135: Invalid method in request ]\xdaGET /git/user/repo.git/info/refs?service=git-upload-pack HTTP/1.1
And I agree with the server that ]\xdaGET
is an invalid method, be cause it should be GET
.
Does someone know where that problem comes from ?
Upvotes: 3
Views: 8411
Reputation: 8126
That means you git client is too old. Please upgrade it to the latest version, and it will be fine.
Upvotes: 1
Reputation: 101
Any reason you have a space after the https:
in your URL? It might just be a syntax error based on that. Should be https://
, not https: //
Upvotes: 0