Unable to push the commit to the Bitbucket Repository in C# using LibGit2Sharp
AnilKumar206 opened this issue · 0 comments
AnilKumar206 commented
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