How to access a GIT repository over authenticated HTTP

Hi

My second headache for today was brought by GIT. I have a simple Apache server providing a restricted access (basic HTTP authentication) on a GIT repository.

From my local terminal, I just wanted to access the repository using:
git clone http://myhost.com/path/to/repository/.git
It asks for credentials (both user name and password), and fails miserably with a 401 error after entering them.

Well the problem is solved by just specifying the user name in the URL:
git clone http://myuser@myhost.com/path/to/repository/.git
This way it asks for just the password, and works like a charm.

Seems like a bug to me :-/

Muriel

About Muriel Salvan

I am a freelance project manager and polyglot developer, expert in Ruby and Rails. I created X-Aeon Solutions and rivierarb Ruby meetups. I also give trainings and conferences on technical topics. My core development principles: Plugins-oriented architectures, simple components, Open Source power, clever automation, constant technology watch, quality and optimized code. My experience includes big and small companies. I embrace agile methodologies and test driven development, without giving up on planning and risks containment methods as well. I love Open Source and became a big advocate.
Git, Howto , , , , , , ,

Leave a Reply

Your email address will not be published.