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

git commands don't work without cached credentials #2899

Closed
aryairani opened this issue Feb 13, 2022 · 1 comment
Closed

git commands don't work without cached credentials #2899

aryairani opened this issue Feb 13, 2022 · 1 comment

Comments

@aryairani
Copy link
Contributor

We currently use System.Process.readProcess and System.Process.readProcessWithExitCode, which pass canned stdin to git. When git wants input from the user (e.g. ssh public key passphrase or https credentials), it fails, resulting in an error like:

I couldn't find the ref v2 in the repository at [email protected]:unisonweb/base ;

or

I couldn't find the ref main in the repository at [email protected]:unisonweb/base ;

The workaround is to set up your environment so that git doesn't ask for credentials, e.g. using ssh-agent to cache your passphrase. If ssh-agent doesn't work for you (it didn't for me in windows (#598)), then you have to not have a passphrase. 😬

A fix would be similar to whatever git is doing to pass input through to ssh. Maybe some CreateProcess](https://hackage.haskell.org/package/process-1.6.9.0/docs/System-Process.html) settings?

@aryairani
Copy link
Contributor Author

Another possible, better workaround for Windows is that there seems to be some sort of Microsoft gui authentication helper for signing into Github via https without stdin. I haven't tried testing this; it's just something that showed up for me when I was trying to accomplish something else.

@aryairani aryairani closed this as not planned Won't fix, can't repro, duplicate, stale Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant