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/build/cmd/gomote: ssh breaks with github usernames including a "-" #21294

Closed
s-mang opened this issue Aug 3, 2017 · 5 comments
Closed

x/build/cmd/gomote: ssh breaks with github usernames including a "-" #21294

s-mang opened this issue Aug 3, 2017 · 5 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Milestone

Comments

@s-mang
Copy link
Contributor

s-mang commented Aug 3, 2017

gomote splits on "-" in order to determine the "gomoteUser" (https://github.com/golang/build/blob/master/cmd/gomote/ssh.go#L38).

My github username has a hyphen (adams-sarah).
So..

$ gomote -user=adams-sarah ssh user-adams-sarah-linux-arm64-packet-0
$ ssh -p 2222 user-adams-sarah-linux-arm64-packet-0@farmer.golang.org 
# auth using https://github.com/adams.keys

Though it should be trying to auth with https://github.com/adams-sarah.keys

Will send a CL.

@gopherbot gopherbot added this to the Unreleased milestone Aug 3, 2017
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Aug 3, 2017
@bradfitz
Copy link
Contributor

bradfitz commented Aug 3, 2017

Your gomote username shouldn't contain a hyphen.

Your github username may, though.

You'll need to add a mapping for yourself to https://github.com/golang/build/blob/4eceee2/internal/gophers/gophers.go#L1549

@s-mang
Copy link
Contributor Author

s-mang commented Aug 3, 2017

ok. so if anyone in the future has a github username with a hyphen, we need to create a mapping for them instead of them using -user=adams-sarah. Even though that would work for a github user without a hyphen in their username? Is that correct?
Or am I just doing things wrong.

@bradfitz
Copy link
Contributor

bradfitz commented Aug 3, 2017

Yes.

If gomoteUser != sshUser, it needs a mapping.

And gomoteUser cannot contain a hyphen.

Thus any github user with a hyphen will need a different gomote username and thus will need a mapping.

There will be like 10-15 people with access to this. I expect maybe 5 mappings.

@s-mang
Copy link
Contributor Author

s-mang commented Aug 3, 2017

Okk sounds good.
Thanks Brad.

@s-mang s-mang closed this as completed Aug 3, 2017
@bradfitz
Copy link
Contributor

bradfitz commented Aug 3, 2017

See https://go-review.googlesource.com/c/53190 for an example of adding a mapping for Ian.

@golang golang locked and limited conversation to collaborators Aug 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

3 participants