Skip to content

libssh2 error in jj git push to GitHub repository: can't authenticate on macOS  #4870

@oyarsa

Description

@oyarsa

Description

This is the error:

> jj git push
Changes to push to origin:
  Add bookmark trunk to adf82c69e122
Error: authentication required but no callback set; class=Ssh (23); code=Auth (-16)
Hint: Jujutsu uses libssh2, which doesn't respect ~/.ssh/config. Does `ssh -F /dev/null` to the host work?

This is the output of the suggested command:

ssh -F /dev/null git@github.com
PTY allocation request failed on channel 0
Hi oyarsa! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.

I've tried with versions from homebrew and cargo, including stable and main branch. The current version was installed like this:

cargo install --git https://github.com/martinvonz/jj.git --features vendored-openssl --locked --bin jj jj-cli

Here's the remote:

jj git remote list
origin git@github.com:oyarsa/jj-hello-world.git

My ~/.ssh/config file doesn't currently have any authentication-related settings, just some aliases. The key has been added to ssh-agent. Git still works.

I apologise if this is a common issue, but I couldn't find anything that seemed relevant to my use-case.

Expected Behavior

Push the current bookmark to git.

Actual Behavior

Error when pushing.

Specifications

  • Platform: macOS, Apple Silicon
  • Version:
    • OS: 14.4.1 (23E224)
    • jj: 0.23.0-5a793f61d68c6fa9f4be2c99f6e9d028781c6d6d

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