Skip to content
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

x/review: Support custom git remote helpers #17299

Open
wlynch opened this issue Sep 30, 2016 · 4 comments

Comments

@wlynch
Copy link
Contributor

commented Sep 30, 2016

What version of Go are you using (go version)?

go version go1.7.1 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOOS="linux"

What did you do?

go get a package that belonged to a repository that used a custom git remote helper.

What did you expect to see?

The repo was successfully fetched.

What did you see instead?

"cannot download, uses insecure protocol"

Proposal

vcs.go is opinionated about what schemes are considered secure. If you are using a git remote helper, tools like go get will return an error because it thinks it is insecure. Passing --insecure allows the repo to be successfully fetched, but this isn't ideal because then all fetches that are pulled in from go get will allow insecure schemes.

We should let vcs.go be aware of the GIT_ALLOW_PROTOCOL environment variable to override the list of secure schemes for git fetches.

Other tools like git-codereview that are affected by similar issues should also be updated.

I'm happy to work on this.

@gopherbot

This comment has been minimized.

Copy link

commented Sep 30, 2016

CL https://golang.org/cl/30135 mentions this issue.

gopherbot pushed a commit that referenced this issue Oct 3, 2016
cmd/go: add support for GIT_ALLOW_PROTOCOL
Allows users to override the default secure protocol list by setting the
GIT_ALLOW_PROTOCOL environment variable.

Addresses #17299 for vcs.go.

Change-Id: If575861d2b1b04b59029fed7e5d12b49690af50a
Reviewed-on: https://go-review.googlesource.com/30135
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

@quentinmit quentinmit added the NeedsFix label Oct 3, 2016

@quentinmit quentinmit added this to the Go1.8 milestone Oct 3, 2016

@quentinmit

This comment has been minimized.

Copy link
Contributor

commented Oct 3, 2016

@wlynch Does your commit resolve this issue?

@wlynch

This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2016

With respect to golang/go, this should be resolved. I'll open a new issue in golang/review to track the changes needed for git-codereview.

@wlynch wlynch closed this Oct 3, 2016

@wlynch

This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2016

Issues are shared between golang/go and golang/review. Reopening to track the changes to golang/review.

I'm also fine with owning this change.

@wlynch wlynch reopened this Oct 3, 2016

@quentinmit quentinmit changed the title cmd/go: Support custom git remote helpers x/review: Support custom git remote helpers Oct 3, 2016

@quentinmit quentinmit modified the milestones: Unreleased, Go1.8 Oct 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.