Skip to content

Consistent indefinite hanging on remote connection #1140

Open
@eighty4

Description

@eighty4

git2-rs is blocking on RemoteConnection over cafe WiFi but works fine on my home network. Sometimes this happens with git when I'm on a public WiFi so I checked and git will pull or clone with SSH over the same network. Is there a configuration piece missing I overlooked? I see RemoteCallacks has proxy config and cert checks in addition to the credentials callback I'm using.

The program works great when the connection doesn't hang indefinitely. Here's an excerpt of where it hangs and here is the complete example.

fn pull() {
    let mut remote_connection =
        remote.connect_auth(Direction::Fetch, Some(remote_auth_callbacks()), None)?;
}

fn remote_auth_callbacks<'a>() -> RemoteCallbacks<'a> {
    let mut remote_callbacks = git2::RemoteCallbacks::new();
    remote_callbacks
        .credentials(|_, username, _| git2::Cred::ssh_key_from_agent(username.unwrap()));
    remote_callbacks
}

Thank you for the great examples in this crate. It helped me put together my work smoothly!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions