vog
vog

Reputation: 25597

How to make "hg clone" with hggit use the .netrc for HTTP authentication?

I have a remote Git repository that is to be accessed via HTTPS with basic auth, whose credentials are properly configured in my ~/.netrc, e.g.

$ cat ~/.netrc
machine example.com login example-user password ***

A git clone works fine:

$ git clone https://example.com/some-repo

However, trying the same with Mercurial using the hggit extension fails with:

$ hg clone git+https://example.com/some-repo
abort: http authorization required for https://example.com/some-repo

Note that hg clone git+https://... works without issues on remote Git repositories that have no HTTP auth.

Upvotes: 0

Views: 42

Answers (0)

Related Questions