libgit2 / libgit2/libgit2sharp

FetchOptions in CloneOptions is readonly and has not been set in constructor !

Open
#2,088 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Reproduction steps

unable to set CredentialsProvider
co.FetchOptions.CredentialsProvider = (_url, _user, _cred) => new LibGit2Sharp.UsernamePasswordCredentials { Username = "username", Password = accessToken };
because the FetchOptions is null and it cannot be set in CloneOptions as it is readonly

Expected behavior
Actual behavior
Version of LibGit2Sharp (release number or SHA1)
Operating system(s) tested; .NET runtime tested

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 by locating the CloneOptions and FetchOptions definitions and reproduce the null FetchOptions behavior shown in the issue. Trace how CloneOptions is constructed; done means callers can configure FetchOptions.CredentialsProvider without a null reference or an unusable readonly property.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend-api-design
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.