Closed NorwegianRockCat closed 15 years ago
Eep. The backtrace got totally mangled. Here it is marked down (or at least I hope it is):
hg gclone git@gitorious.org:qt/qt.git
fetching from : origin
exporting git objects
Access denied or bad command
* unknown exception encountered, details follow
* report bug details to http://www.selenic.com/mercurial/bts
* or mercurial@selenic.com
* Mercurial Distributed SCM (version 1.2.1)
* Extensions loaded: convert, fetch, graphlog, bookmarks, hg-git, parentrevspec, purge, rebase, hgk, mq, record, transplant
Traceback (most recent call last):
File "/usr/local/bin/hg", line 27, in
Hi, NorwegianRockCat.
I'm having the same issue with a public-key setup on Heroku. In this case, it was because hg-git was adding a leading slash to the remote path. Heroku was responding, "No, you can't push to /reponame, it has to be just reponame instead."
The quick fix was to change the get_transport_and_path
function in git_handler.py to return transport(host), path
instead of transport(host), '/' + path
.
Does this work in your case? If so, I'll ask Scott about the circumstances under which we can or can't add a slash, and cook up something more formal in the way of a real patch.
ah yes, for now you actually have to use 'git+ssh://git@gitorious.org:qt/qt.git' - it doesn't assume the ssh part yet. soon.
Hi, Scott. I think the git+ssh URL style you mention is likely to address issue #15, but the Heroku path issue persists. I'll continue discussion of it here (since it's kind of related), but am happy to move to a new ticket if you prefer.
May I propose a patch where we don't add the leading slash unless the repo URL has a colon-slash (for git@ URLs) or a double-slash (for git+svn:// URLs)? If that sounds reasonable, I'll check in a change and send a pull request.
Hi Schacon,
If I change to using a git+ssh URL I get further, but still get into problems. I then get the error "access denied or bad command."
Here's another backtrace:
hg gremote
remote.origin.url git+ssh://git@gitorious.org/qt/qt.git
hg gfetch
pulling from git url
fetching from : origin
exporting git objects
at: 0/1391
at: 100/1391
at: 200/1391
at: 300/1391
at: 400/1391
at: 500/1391
at: 600/1391
at: 700/1391
at: 800/1391
at: 900/1391
at: 1000/1391
at: 1100/1391
at: 1200/1391
at: 1300/1391
Access denied or bad command
* unknown exception encountered, details follow
* report bug details to http://www.selenic.com/mercurial/bts
* or mercurial@selenic.com
* Mercurial Distributed SCM (version 1.2.1)
* Extensions loaded: convert, fetch, graphlog, bookmarks, hg-git, parentrevspec, purge, rebase, hgk, mq, record, transplant
Traceback (most recent call last):
File "/usr/local/bin/hg", line 27, in
Hmm... I would say something also is wrong with the paths too. If I just change to using git+ssh it seems to get confused with the colon as well. The last one I showed just had a slash instead and it got further:
hg gremote
remote.origin.url git+ssh://git@gitorious.org:qt/qt.git
hg gfetch
... (same "at" stuff from before) then:
ssh: Could not resolve hostname gitorious.org:qt: nodename nor servname provided, or not known
* unknown exception encountered, details follow
* report bug details to http://www.selenic.com/mercurial/bts
* or mercurial@selenic.com
* Mercurial Distributed SCM (version 1.2.1)
* Extensions loaded: convert, fetch, graphlog, bookmarks, hg-git, parentrevspec, purge, rebase, hgk, mq, record, transplant
Traceback (most recent call last):
File "/usr/local/bin/hg", line 27, in
Hope this helps.
It seems that the hg-git plugin has issues when given a URL that uses SSH public keys.
An example can be seen with the Qt repository (http://qt.gitorious.org/qt). Assuming you have a login, you will see the following clone URLs available:
Public clone url: git://gitorious.org/qt/qt.git
Your clone url: git@gitorious.org:qt/qt.git
If you run gclone with the "Public clone url," it works as expected.
If you run gclone with the "Your clone url," it crashes with the following backtrace:
It also fails if you set this as a remote and do a gfetch.
This was on Mac OS X 10.5.6 using the binary Mercurial package available from:
http://www.selenic.com/mercurial/wiki/BinaryPackages#head-ea0494fa54ddf09d8995040bbe29a65ecc04d9d9
Sorry if I'm using the wrong terminology.