mercurial hg-git cannot push to github

Paul Jackson pj at usa.net
Wed Nov 20 06:31:33 UTC 2019


Starting once again with a non-existent subdirectory ./rawscan,
and doing your suggested:

hg clone git+https://github.com/ThePythonicCow/rawscan.git rawscan

(which is what I had done earlier, plus the "git+" prefix),

the clone continued to work fine, with one quite reasonable difference,
that being that the newly created rawscan/.hg/hgrc file differed from
the  hgrc file that my earlier  hg clones had created as follows:

=========
$ diff rawscan.old/.hg/hgrc rawscan/.hg/hgrc
3c3
< default = https://github.com/ThePythonicCow/rawscan.git
---
> default = git+https://github.com/ThePythonicCow/rawscan.git
=========

Ok so far.  The added "git+" prefix shows up in .hg/hgrc.  Good.

But then I found no further joy.

First, if either of your suggested "hg push" variants were to be
preferred over one using the above "git+https://..." variant,
why wouldn't my new .hg/hgrc file already have that better
default?

Second, neither of your suggested "hg push" variants worked
for me in this new "./newscan" hg clone, nor for that matter
did a naked "hg push" (thus using the above new "git+http://..."
default) work either.

I made and committed another trivial change to an already
tracked file, then tried the following four variants, with
both the command I entered and the varying error results
shown below:

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

$ hg push git at github.com:ThePythonicCow/rawscan.git
abort: repository git at github.com:ThePythonicCow/rawscan.git does not exist!

$  hg push git+ssh://git@github.com/ThePythonicCow/rawscan.git
pushing to git+ssh://git@github.com/ThePythonicCow/rawscan.git
Unable to negotiate with 192.30.253.112 port 22: no matching key exchange method found. Their offer: curve25519-sha256,curve25519-sha256 at libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256
abort: git remote error: The remote server unexpectedly closed the connection.

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

It does not surprise me that the third, "git+ssh" variant did not work,
as  I do not have my github account setup to use ssh.

Nor does it surprise me that the fourth, final variant failed the same
way as the first one, as thanks to the .hg/hgrc default path, they are
essentially the same.

Nor does it surprise me that I am still clue deprived.

-- 
                Paul Jackson
                pj at usa.net



More information about the Mercurial mailing list