libgit2 / libgit2/libgit2

You shouldn't need a public key to ssh auth

Open
#4,289 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Reproduction steps

call git_cred_ssh_key_new() without a public key

Expected behavior

it works, the private key already has the public key encoded in it.

Actual behavior

it fails

Version of libgit2 (release number or SHA1)

c26ce78 (n/a, head given)

Operating system(s) tested

windows 7

downstream bug report: tgstation/tgstation-server#96
downstream bug report: libgit2/libgit2sharp#1468

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the git_cred_ssh_key_new() entry point and reproduce the failure when only a private key is supplied. Trace how SSH credentials are validated, then verify that authentication succeeds without an explicit public key while preserving the existing behavior when one is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.