-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
https://github.com and git@github.com equivalence #65
Comments
This issue is subtle. Let me explain what's going on. The reason GPS currently prints that error is not because of the difference in scheme (git@github.com:... vs https://github.com/...). It correctly compares different schemes and considers them equivalent via The actual reason it says they're different is because of the ".git" suffix that one URL has but the other doesn't. Related issue: You can read my detailed rationale for the behavior in shurcooL/gostatus#37 (comment). @mafredri came up with a nice way to quickly fix the problem in his GOPATH in shurcooL/gostatus#37 (comment). Another highly related issue is: Which I think definitely played a role here, and I should try to fix it. However, the fact that |
This is sad, but ~ $ export GOPATH=/tmp/trygopathstuffmajing
~ $ go get -u -v github.com/gorilla/mux
github.com/gorilla/mux (download)
created GOPATH=/tmp/trygopathstuffmajing; see 'go help gopath'
github.com/gorilla/mux
~ $ gocd ...mux
mux $ go list
github.com/gorilla/mux
mux $ pwd
/tmp/trygopathstuffmajing/src/github.com/gorilla/mux
mux $ git remote
origin
mux $ git remote -v
origin https://github.com/gorilla/mux (fetch)
origin https://github.com/gorilla/mux (push)
mux $ git remote show origin
* remote origin
Fetch URL: https://github.com/gorilla/mux
Push URL: https://github.com/gorilla/mux
HEAD branch: master
Remote branches:
custom-context tracked
master tracked
matcher-refactor tracked
subexp-fix tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
mux $ go list
github.com/gorilla/mux
mux $ go get -u -v
github.com/gorilla/mux (download)
mux $ git remote set-url origin https://github.com/gorilla/mux.git
mux $ go get -u -v
github.com/gorilla/mux (download)
mux $ git remote set-url origin https://github.com/gorilla/mux.gitt
mux $ go get -u -v
github.com/gorilla/mux (download)
# cd /tmp/trygopathstuffmajing/src/github.com/gorilla/mux; git pull --ff-only
remote: Repository not found.
fatal: repository 'https://github.com/gorilla/mux.gitt/' not found
package github.com/gorilla/mux: exit status 1
mux $ git remote set-url origin https://github.com/jorisshh/mux.git
mux $ go get -u -v
github.com/gorilla/mux (download)
package ironMind/logger: unrecognized import path "ironMind/logger" (import path does not begin with hostname)
package ironMind/middleware: unrecognized import path "ironMind/middleware" (import path does not begin with hostname)
mux $ Edit: I'm starting to suspect this might be an unintentional bug/regression in
I'll look more into it and see if an issue needs to be filed for Go. |
Match the current repo URL format when printing the expected URL. This makes it easier to spot the actual difference in the URL. Follows shurcooL/gostatus@cf96920. Helps #65.
I've resolved shurcooL/gostatus#39 and applied the fix to Go Package Store in 12c0a37. Hopefully that helps. |
I consider 12c0a37 to have resolved this issue. I will look into Closing, let me know if you have any further comments. |
I'm seeing lots of messages like:
skipping "github.com/prometheus/prometheus" because:
remote URL (git@github.com:prometheus/prometheus.git) doesn't match repo URL inferred from import path (https://github.com/prometheus/prometheus)
Would it be possible for the tool to realize that they are equivalent and follow the origin git@github.com:prometheus/prometheus.git? The
go
tool seems to be able to handle it - I can do:go get -v -x github.com/prometheus/prometheus/...
even though my origin for$GOPATH/src/github.com/prometheus/prometheus
is set togit@github.com:prometheus/prometheus.git
, nothttps://github.com/prometheus/prometheus
.The text was updated successfully, but these errors were encountered: