Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AnilKumar206 opened this issue Jun 10, 2024 · 0 comments

Comments

@AnilKumar206
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant