-
Notifications
You must be signed in to change notification settings - Fork 318
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
Authentication not working #81
Comments
This same error is also affecting me on Windows 10 with jj 0.2.0 and Git for Windows 2.32.0.windows.2 |
What kind of authentication do you use with your remotes? So far, the only supported types of authentication are by Line 433 in 76974a9
|
I see. Line 443 in 76974a9
jj is only looking for a key named id_rsa , which was not the case for me.Thank you ! |
I was just "bitten" by this, too - GitHub's documentation no longer recommends RSA, and now directs users to use ed25519 instead. Given that, would it make sense to add support for other key locations / types? |
Definitely! #63 is probably the right way to do that, right? I know very little about |
TBH, I don't actually know... I'm not sure what the connection between |
ssh-agent is actually already supported, so if using ssh-agent is an option for you, I'd really recommend that (with jj and other tools). Let me know if you have ssh-agent set up and it's not working, of course. I'm also happy to take a patch adding support for just the kind of key file and path you're using. |
Hmm, then I'm not sure what the issue is - I had the same issue as the original reporter, even though I do have ssh-agent set up (and
Thanks! I'll try to find some time this/next week and add this. |
I don't know much about how this works either :) I think
You shouldn't have to configure anything specifically for jj. The code is here. Do you have
Thanks! |
Interesting. I only have $SSH_AUTH_SOCK set, but not $SSH_AGENT_PID. When running |
After some quick googling, it seems that
That might work and seems best if it does work. My concern is that the documentation for the function says "Create a new ssh key credential object used for querying an ssh-agent.", which made me wonder if it has already checked if it can connect to ssh-agent when it's called or not. Again, if the return value seems reliable, then please do use that method. |
FYI, I did some quick tests and it seems that it returns |
Hmm, yeah, I think this is the libgit2 code that does this, and it doesn't actually try to connect to the agent... OK, so for now I'll just send a PR that changes the PID check to check for the socket instead? |
Please do. Thanks! |
Expected Behavior
In a private remote Github repo, fetch / push the changes.
Actual Behavior
With a fetch / push, jj says:
Error: Unexpected git error when fetching: authentication required but no callback set; class=Ssh (23); code=Auth (-16)
Error: Unexpected git error when fetching: remote authentication required but no callback set; class=Http (34); code=Auth (-16)
Steps to Reproduce the Problem
jj git fetch
Specifications
The text was updated successfully, but these errors were encountered: