You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubfnpush(&self,branch:&str) -> Result<()>{letmut remote = self.repo.find_remote("origin").with_context(|| "Failed to push the repository")?;let branch = self.repo.find_branch(branch, git2::BranchType::Local).with_context(|| "Failed to find the branch")?;let refs = branch.into_reference();let name = refs.name().with_context(|| "The reference name is none")?;letmut callbacks = git2::RemoteCallbacks::new();
callbacks.credentials(|_url, username_from_url, _allowed_types| {
tracing::info!("Allowed types: {:?}", _allowed_types);Cred::ssh_key(
username_from_url.unwrap(),None,
std::path::Path::new(self.pub_key.as_str()),None,)});letmut options = git2::PushOptions::new();
options.remote_callbacks(callbacks);// push the code to master branch
remote
.push(&[name],Some(&mut options)).with_context(|| "Failed to push the code")?;Ok(())}
it's working fine on mac but get an error on windows failed to set hostkey preference: The requested method(s) are not currently supported; class=Ssh (23)
The text was updated successfully, but these errors were encountered:
Hi @phostann! Have the same issue on windows 11. Did you fix it somehow?
Everything working at linux (ubuntu 22.04), but getting the same error on windows 11
here is my code
it's working fine on mac but get an error on windows
failed to set hostkey preference: The requested method(s) are not currently supported; class=Ssh (23)
The text was updated successfully, but these errors were encountered: