You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Set up Mercurial to serve a repo over ssh
2. Attempt to use "go get" to access the repo, specifying the repo using an
absolute path
What is the expected output?
I would expect it to be possible
===
I would like to be able to fetch private repositories with "go get", via ssh.
However, HG over ssh uses a double slash to specify an absolute path, and "go
get" cleans the URL of double slashes, converting them to single slashes.
Example
A mercurial command to clone the repo would be:
$ hg clone ssh://myhg.com//abs/path/to/repo"
Attempting it with "go get":
$ go get -x -v myhg.com//abs/path/to/repo.hg
Results in:
...
# cd .; hg identify ssh://myhg.com/abs/path/to/repo
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
myhg.com/abs/path/to/repo.hg (download)
HG uses a double slash to denote an absolute path. With a single slash, the path is
taken relative to the user's home directory (which is not appropriate for shared repos).
===
Kyle Lemons had some notes:
- to handle this case, only // between the host and path would need to be maintained
- we might also only allow the // when we try ssh://, since that seems like the only one
that wants it
The text was updated successfully, but these errors were encountered:
I'm not sure there's a change to be made here. The argument to go get is an import path.
The common case where the import path matches a well-known repo (e.g. github) is handled
to make things smoother, but it still remains that the argument is an import path, not a
URL.
I agree it would be neat if it "just worked", but it's not hard to
cd $GOPATH/src
hg clone ssh://myhg.com//abs/path/to/repo
It would be nice to be able to go get ssh:// and the go get tool would auto strip out
the ssh and port numbers when creating the directories in GOPATH.
The text was updated successfully, but these errors were encountered: