-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: failed to fetch private repo with multiple error situations #38345
Comments
Are you sure that the repository at http://git2.likeit.cn/go/likesync.git at the commit tagged |
@bcmills I will verify that tomorrow. However, the key problem is even if we have a go.mod file at git.likeit.cn/go/likesync@1.5.3, it does not explain why the go command try to find the module at git.likeit.cn?? in the entire project, there is only reference to git2.likeit.cn? This is unbelivable... or, is it sooo intelligent to check git\d*.likeit.cn?? |
Nothing in that |
yes, you are right, there is a module spec @v1.5.3. However, the master HEAD is newer than v1.5.3, and that go.mod file is deleted. Why it is still referenced? |
Per
|
@bcmills OK. So the behavior is by design. Shall I close this ticket, or is there anything to investigate, given the different behavior of not having a go.mod, and having a go.mod? |
I don't think there is anything more to do here, so closing. Please do let us know if you run into other issues, though. (We know that the documentation & test coverage for private repos still needs some polish.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried to migrate a project to use go modules: create empty
go.mod
file in the project source dir, then rungo build ./...
.What did you expect to see?
The project should be built successfully.
What did you see instead?
Got problem described here: https://stackoverflow.com/questions/60341591 I tried to ask new question on SO but get down voted. Then, I did the following test:
i.e. Go insist to get the repo via HTTPS but the private repo only provide HTTP. The problem was reported in #37943. However it re-appeared, despite the fact that all env was set according to that issue.
Then, I created an empty mod in that directory:
This time, it does not insist on HTTPS, but found an old location of the repo. There is a likesync package under
git.likeit.cn/go/likesync
, in that repo, there indeed has a go.mod file states:module git.likeit.cn/go/likesync
. This repo was abandoned, albeit still accessible.In the new repo git2.likeit.cn/go/likesync, their is no go.mod file. My problem is, WHY and HOW does the go build system find
git.likeit.cn
as the project ONLY refer togit2.likeit.cn
??The text was updated successfully, but these errors were encountered: