Skip to content

Unable to push the commit to the Bitbucket Repository in C# using LibGit2Sharp #2102

@AnilKumar206

Description

@AnilKumar206

Hi Team,

Iam recently used LibGit2Sharp dll version is 0.30.0 with Net core c#.Here when i try to push the READ.MD file iam able to push one time to master branch.After that 100 commits i tried to push but its not reached to Bitbucket Repository.

I used below code to push

PushOptions options = new PushOptions();
options.CredentialsProvider = new CredentialsHandler(
(url, usernameFromUrl, types) =>
new UsernamePasswordCredentials()
{
Username = "xxxxxxxxxxxxxxxxxxxxx", //user name of the bitbucket account
Password = "xxxxxxxxxxxxxxxxxxxxxx" // Api key of the bigbucket account
});

repository.Network.Push(remote, $"+refs/heads/master", options);

//repository.Network.Push(remote, masterBranch.CanonicalName, options);
Console.WriteLine("Push the Branch Successfully.");
//repo.Network.Push(masterBranch, options);

Can anyone please help me on this.

Thanks,
AnilKumar.D

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