Skip to content

sshprovider: on Windows, ModeSocket might not be set on the ssh socket#1695

Merged
tonistiigi merged 1 commit into
moby:masterfrom
tilt-dev:nicks/issue914
Sep 23, 2020
Merged

sshprovider: on Windows, ModeSocket might not be set on the ssh socket#1695
tonistiigi merged 1 commit into
moby:masterfrom
tilt-dev:nicks/issue914

Conversation

@nicks

@nicks nicks commented Sep 22, 2020

Copy link
Copy Markdown
Contributor

I tested this with https://github.com/tilt-dev/tilt, which links in the SSHProvider code directly and calls buildkit with the API library

Before this change, ssh mounts failed with

could not parse ssh: [default]: failed to parse C:/Users/nick/AppData/Local/Temp/ssh-fEsqO14952/agent.14952: ssh: no key found

After this change, they worked correctly.

Fixes #914

@nicks
nicks force-pushed the nicks/issue914 branch 2 times, most recently from 00cde95 to 45fab30 Compare September 22, 2020 23:10
@tonistiigi

Copy link
Copy Markdown
Member

Weird that I tried a similar fix in #914 (comment) but got a permission error afterward that I couldn't figure out. If you have any idea what may have caused that (or steps how a binary should be configured) you may leave instructions here as well.

From Go issue it looks like there are some safer ways to detect socket on windows but I guess this may do as a fallback for now.

Missing DCO

@nicks

nicks commented Sep 22, 2020

Copy link
Copy Markdown
Contributor Author

Fixed the DCO!

I would not be surprised if there are two different bugs - one for the file mode, and an independent one with the permission error. I did not see the permission error 😬

Yes, if you want, I can patch in one of the suggested fixes from golang/go#33357, but wasn't sure which one was dependable across versions. I was hoping that since this codepath is heading towards a failure case anyway, it's ok for the check to be a guesstimate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ssh agent only forwarded from keys on Windows

3 participants