-
Notifications
You must be signed in to change notification settings - Fork 411
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
failed to authenticate SSH session #1139
Comments
if I also add the public key it's an infinite loop not stopping and re-trying |
@vlad-anger I saw you in a libgit2 PR. Can you help? or tag someone who can? |
@harilet Yes
|
so even though
|
I can push with killed ssh-agent. Cred callback with priv. key seems to be sufficient (which intuitively makes sense). But i'm not that knowledgeable & sure, It's |
I think the key and git remote are fine cause the my id_rsa is a publickey? |
You can name files how you want, but most likely It's private, public should be Btw do you have chance to test on linux machine | in vm, just to cut area of issue? |
my id_rsa starts with |
I'm not sure if issue is related to libgit2 + windows, or still tricky thing with your keys |
I think I'm having similar issue. So at first I setup creds like this: let mut callbacks = RemoteCallbacks::new();
callbacks.credentials(|url, username_from_url, allowed_types| {
println!("Connecting to: {url}");
if allowed_types.is_ssh_key() {
return Cred::ssh_key_from_agent(username_from_url.unwrap_or("git"));
}
Err(git2::Error::from_str("No valid credentials available"))
}); It worked fine on It just goes into infinite loop and calls Then I tried to manually get the key like this: let key = Cred::ssh_key(
"git",
Some(&public_path()),
&private_path(),
Some("PASSWORD"),
)?; On On It is obviously failing and trying to get the key again but my main question is where can I get error messages from these fails? Why does it tries to get the key over and over again instead of just failing with error message? |
when I don't use the public key I get in some link @vlad-anger gave, there ssh agent was being used, so I tried this
and it works fine |
|
Yes, worked in windows for me code:
Output: |
Where can I get the error messages when it goes in the infinite loop to understand what goes wrong in my case? |
Error message code:
Loop code:
output: |
I get error message too if I remove public key and infinite loop with it. |
I don't see an error for the infinite loop, can I see it if I open and repack |
I am trying to push to a github repo using the ssh remote but I am getting an error
failed to authenticate SSH session: ; class=Ssh (23)
the code
and I am getting this output
and I am able to read the key file
can anyone help?
The text was updated successfully, but these errors were encountered: