mercurial hg-git cannot push to github

Paul Jackson pj at usa.net
Tue Nov 19 23:44:02 UTC 2019


I have just started using mercurial hg-git , well, started re-using it,
after noticing that the mercurial alternative to git that I preferred
back when I was doing Linux kernel work circa 2005 was alive and
well and growing stronger.

Before checking in anything serious with hg, I decided just now to
try a trivial checkin, just to make sure I had the basics working.

That failed. To quote (edited and reformatted) what I wrote just now on the #mercurial IRC chat:

==========

I can't get mercurial to work with a git clone. Just doing the following failed:
 1. hg clone https://github.com/ThePythonicCow/rawscan.git rawscan
 2. cd ./rawscan
 3. hg push

That failed with:

pushing to https://github.com/ThePythonicCow/rawscan.gitabort: git remote error: unexpected http resp 401 for https://github.com/ThePythonicCow/rawscan.git/info/refs?service=git-receive-pack

The "./rawscan" subdirectory did not exist prior to step 1, above.

===

I am using hg version 4.8.2, on Ubuntu 19.10

I have mercurial-git 0.8.12-1.1j installed..

===

On the off chance that the push was failing because I not made any changes to my local clone, I made a small change to an existing file, did a (1) hg commit -m"a small change" that_file, and (2) hg push again.

Same error message on the push: 

abort: git remote error: unexpected http resp 401 for https://github.com/ThePythonicCow/rawscan.git/info/refs?service=git-receive-pack

===

To verify that git, as opposed to hg, still worked to do the same thing, I did a fresh
 1.  git clone https://github.com/ThePythonicCow/rawscan.git rawscan_fresh_git.dir
 2. cd ./rawscan_fresh_git.dir
 3. edit .gitignore
 4. git add .gitignore
 5. git commit -m"adapt .gitignore to mercurial limitations (no ! terms)"
 6. git push

That worked fine

You can view my newly edited file at https://github.com/ThePythonicCow/rawscan/blob/master/.gitignore

==========

I have no idea whether this is a "newbie" problem, a problem specific to my setup, or some
wider problem.

-- 
 Paul Jackson
 pj at usa.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial/attachments/20191119/a8383a9a/attachment.html>


More information about the Mercurial mailing list