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

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

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

nicks
Copy link
Contributor

@nicks nicks commented Sep 22, 2020

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
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
Copy link
Contributor Author

nicks commented Sep 22, 2020

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