-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: in 1.13, the way extracting module vcs address might be incorrect #34339
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
Comments
cc @bcmills The domain @Ronmi Could you post the output of the commands below:
The server should respond with a |
Thanks for reply. We use gitea 1.9.1 as git server $ curl https://git.jen.da/richpay/richpay/common?go-get=1
<!doctype html>
<html>
<head>
<meta name="go-import" content="git.jen.da/richpay/richpay git http://git.jen.da/richpay/richpay.git">
<meta name="go-source" content="git.jen.da/richpay/richpay _ http://git.jen.da/richpay/richpay/src/branch/master{/dir} http://git.jen.da/richpay/richpay/src/branch/master{/dir}/{file}#L{line}">
</head>
<body>
go get git.jen.da/richpay/richpay
</body>
</html> $ curl https://git.jen.da/richpay/richpay?go-get=1
<!doctype html>
<html>
<head>
<meta name="go-import" content="git.jen.da/richpay/richpay git http://git.jen.da/richpay/richpay.git">
<meta name="go-source" content="git.jen.da/richpay/richpay _ http://git.jen.da/richpay/richpay/src/branch/master{/dir} http://git.jen.da/richpay/richpay/src/branch/master{/dir}/{file}#L{line}">
</head>
<body>
go get git.jen.da/richpay/richpay
</body>
</html> $ curl https://git.jen.da/richpay?go-get=1
<!doctype html>
<html>
<head>
<meta name="go-import" content="git.jen.da/richpay git http://git.jen.da/richpay/.git">
<meta name="go-source" content="git.jen.da/richpay _ http://git.jen.da/richpay/src/branch/master{/dir} http://git.jen.da/richpay/src/branch/master{/dir}/{file}#L{line}">
</head>
<body>
go get git.jen.da/richpay
</body>
</html>
result of running
There's no single line imports $ grep -F git.jen.da *.go **/*.go|grep -vF '// import'|awk '{print $2}'|sort|uniq
"git.jen.da/richpay_drivers/firstbank"
"git.jen.da/richpay_drivers/firstbank/lib"
"git.jen.da/richpay_drivers/firstbank/libcheck"
"git.jen.da/richpay/richpay/common"
"git.jen.da/richpay/richpay/dba/paymentdb"
"git.jen.da/richpay/richpay/models/payment/driver"
"git.jen.da/richpay/richpay/models/payment/orders"
"git.jen.da/richpay/richpay/models/payment/results" I also tried few other ways
|
This is likely the same underlying issue as #34094 (see #34094 (comment) in particular). @Ronmi, please try a |
Thanks for the references. I'm pretty sure these are same issues, excepts one small detail: Our gitea server requires users login before accessing any repo (by enabling I tried I also noticed that gitea 1.9.3 fixed response of |
Our expectation is that users are already authenticated to the server (via credentials stored in a So you should not have to enable |
As of CL 194561, there are two opportunities for an HTTPS server to signal that a given module path does not exist:
Following approach (1), as long as the 302'd page does not include a misleading |
Thanks for confirming. In that case, shall I close this as a duplicate of #34094?
For reference, that seems to be go-gitea/gitea#8095. |
I'm good with it since the root cause is bug of Gitea. Thanks for your help.
Yes. That's where I found the information. |
Duplicate of #34094 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No,
go mod tidy
runs smoothly in 1.12/1.11What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
We hosted a vcs server
import "git.jen.da/richpay/richpay/common"
go env -w GOPRIVATE=*.jen.da
go mod tidy
What did you expect to see?
It downloads correct content and writes correct record into mod cache, as in go 1.12/1.11
What did you see instead?
It downloads correct contents into
$GOPATH/pkg/mod/git.jen.da/richpay/[email protected]
, but write incorrect git config in mod cache.Here's the dump of git config in mod cache (
$GOPATH/pkg/mod/cache/vcs/c4ba413bf2fb1e97c0b587f6f7a0f095d2fd852b4bb0216247272f4bb68ff7a6
)As mentioned above, the
origin.url
is supposed to behttp://git.jen.da/richpay/richpay.git
Only repo named same as user is affected, importing something like
git.jen.da/richpay/tools
works smoothly.The text was updated successfully, but these errors were encountered: