Error pushing to github using 0.26.2

Open
#2,101 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, git, github

Research direction

No file or test is named. Start by reproducing the push with libgit2sharp 0.26.2 and the shown PushOptions and CredentialsHandler, then inspect the complete failure details and authentication behavior. Done means identifying a reproducible cause and documenting or verifying a fix for the HTTP 500 response.

Written by the indexing model from the issue text.

Description

I'm using 0.26.2 to push files to github, and it gives me request failed with status code 500, and I'm using personal access token of github for authentication.

following is how I create push option
return new PushOptions()
{
CredentialsProvider = CreateCredentialsProvider(),
OnPushStatusError = new PushStatusErrorHandler(error =>
{
throw new NonFastForwardException($"{error.Message} at {error.Reference}");
})
};

and following is how I create Credentials Provider:
return new CredentialsHandler((url, userNameFromUrl, types) =>
{
return new UsernamePasswordCredentials()
{
Username = credential.UserName,
Password = credential.Password ?? string.Empty,
};
});

can somebody help me to find out what's wrong

Dominant language
C#
Stars
3.5k
Forks
925
PR merge metrics
No merged PRs in 30d

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.

More from libgit2/libgit2sharp

All issues in libgit2/libgit2sharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.