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/tools/cmd/go-contrib-init: incorrectly reports I have bad cookies file #20992

Closed
kevinburke opened this issue Jul 12, 2017 · 4 comments
Closed
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@kevinburke
Copy link
Contributor

Here's my cookies file (token elided):

$ cat ~/.gitcookies
.googlesource.com	TRUE	/	TRUE	2147483647	o	git-kev.inburke.com=etuheanuhetnohueont

This fails the check in checkCLA:

	if bytes.Contains(slurp, []byte("go.googlesource.com")) &&
		bytes.Contains(slurp, []byte("go-review.googlesource.com")) {
		// Probably good.
		return
	}
	log.Fatal("Your .gitcookies file isn't configured.\n" +
		"Next steps:\n" +
		"  * Submit a CLA (https://golang.org/doc/contribute.html#cla) if not done\n" +
		"  * Go to https://go.googlesource.com/ and click \"Generate Password\" at the top,\n" +
		"    then follow instructions.\n" +
		"  * Run go-contrib-init again.\n")
}

cc @bradfitz @spf13

@gopherbot gopherbot added this to the Unreleased milestone Jul 12, 2017
@kevinburke kevinburke changed the title x/tools/cmd/git-contrib-init: incorrectly reports I have bad cookies file x/tools/cmd/go-contrib-init: incorrectly reports I have bad cookies file Jul 12, 2017
@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jul 12, 2017
@bradfitz
Copy link
Contributor

Good catch. Want to send a fix?

@kevinburke
Copy link
Contributor Author

kevinburke commented Jul 12, 2017 via email

@bradfitz
Copy link
Contributor

bradfitz commented Jul 12, 2017

Well, you can't just search for bytes.Contains of .googlesource.com because it might be NOTGO.googlesource.com only. But you can do a regexp search like (?m)^(go|go-review)?\.googlesource.com\b (https://play.golang.org/p/IrQEbfGJb1).

@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Jul 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants