-
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: private repos on hard-coded hosting providers require special configuration #26134
Comments
What What happens if you attempt to Are you using the credential helper? |
I don't know, I just updated it before running it... how can I know the commit?
The simple
I don't think so, I exchanged the keys with github so my remote is like
|
The error text shows the command being run. It is one of the few git commands that doesn't actually care about having a git repo to run, so you can just try it in any directory you want:
Does it work? |
Possible duplicate of #26145 but the error message from git is different (no mention of terminal prompts disabled). |
Ok, so
but
Maybe I am able to reach the repository only via ssh? |
If you can make the https form work then vgo (and old go get) will be happy. The two possible ways to do that are:
where APIKEY is an API key obtained from the GitHub API page with access to private repos. |
Retitling this to "cmd/go: github private repos require special configuration". |
The first option, adding
to |
Hi Guys, I don't know if this is the correct issue to comment on so please forgive me if it's not correct, I ended up here because of an Issue I am having with Gitlab. We have a project structure where we use subgroups for project organisation by client/project/repo. So our package import paths are 3 levels deep rather than the standard 2 you see on Github. This is fine except for an issue with
Gitlab recently did implement support for a HTTP header to override this behaviour over here: https://gitlab.com/gitlab-org/gitlab-ce/issues/42817 so we can send a We could update our import paths to include a I guess what we need is a way for |
To add to the list of options in this space (#26134 (comment)), we should also add use of a keychain/keyring as a third option (which is independent of remote VCS). Instructions vary quite widely between platforms, unsurprisingly:
I've switched back from using the ssh solution on Linux to using Gnome keyring (even though I don't use Gnome) to great effect... not least because it can be used to unify all credentials. @FiloSottile are there are any security implications that I'm unaware of with respect to the use of keychain/keyrings for this sort of thing? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I have reason to believe that this statement may have been mistaken. I plan to investigate further. This issue somehow ended up in the Proposals queue in Feb. 2021, but I'm not sure why — I think it may be just a bug. |
I've started to suspect that this may just be a problem in the way that we probe for which protocol to use. It appears that both GitHub and GitLab support SSH by having everyone use the username |
This comment has been minimized.
This comment has been minimized.
This needs some more thought and investigation |
This comment has been minimized.
This comment has been minimized.
If you need conditional git includes, using
That said, should this be retitled to focus on ssh probing? |
This comment has been minimized.
This comment has been minimized.
if you want to use gitdir, you'll need to set the GOAUTH variable https://pkg.go.dev/cmd/go#hdr-GOAUTH_environment_variable |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes (coming from #25590)
What operating system and processor architecture are you using (
go env
)?What did you do?
I ran
where:
What did you expect to see?
The package code in MY_REPO or the go module downloaded
What did you see instead?
The text was updated successfully, but these errors were encountered: