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
$ go get -d -v git.mycompany.com/dmitris/webseclab.git
# cd .; git ls-remote git://git.mycompany.com/dmitris/webseclab
fatal: remote error:
GitHub private mode is enabled. Git protocol is disabled. Use authenticated http or ssh access instead.
git.mycompany.com/dmitris/webseclab.git (download)
$ ls $GOPATH/src/git.mycompany.com/dmitris
webseclab.git
I would expect the directory webseclab and webseclab.git to be created. With the directory ending with ".git", you cannot go to the next step - go install -v git.mycompany.com/dmitris/webseclab
but instead have to rename the directory first.
The text was updated successfully, but these errors were encountered:
The command "go get -d -v git.mycompany.com/dmitris/webseclab.git" is
asking go tool to create webseclab.git.
Am I missing something?
mikioh
changed the title
cmd/go - go get git.mycompany.com/foo/bar creates a foo/bar.git directory instead of foo/bar
cmd/go: go get git.mycompany.com/foo/bar creates a foo/bar.git directory instead of foo/bar
Feb 5, 2015
.git suffix in "go get -d -v git.mycompany.com/dmitris/webseclab.git" is necessary to signal to "go get" that it should treat the repository as a Git one. But the created directory should be webseclab, not webseclab.git. Compare the git command-line invocation:
git clone git@github.com:yahoo/webseclab.git
it produces a webseclab directory as you expect, not webseclab.git one.
If go get creates a directory ending with .git as now, you cannot follow go install -d <git_server>/<package_name> with go install -v <package_name>/... - but instead have to first do mv <package_name>.git <package_name> which is annoying and unnecessary.
Does it make sense?
I'm going to ask on golang-dev@ if the Go team would consider adding -scm command-line option so that you could do go get -d -scm=git git.mycompany.com/dmitris/webseclab and it would work just like with the hardwired github.com without having to add ".git" suffix.
We have a git server that only supports SSH authentication. I use a .gitconfig setting with the insteadOf mapping:
[url "git@git.mycompany.com:"]
insteadOf = https://git.mycompany.com/
I would expect the directory webseclab and webseclab.git to be created. With the directory ending with ".git", you cannot go to the next step - go install -v git.mycompany.com/dmitris/webseclab
but instead have to rename the directory first.
The text was updated successfully, but these errors were encountered: