Comments (4)
Did it ever work for you? I have the same issue with version 0.30 with GitHub, issue started around 18 hours ago, without any code changes.
Pulling with the same credentials works.
from libgit2sharp.
Same problem here.
We use 0.27.2 with the Personal access token and have no code changes and now we also get the error message when pushing.
LibGit2Sharp.LibGit2SharpException: request failed with status code: 500.
An update to 0.30.0 throws the same error message
repository.Network.Push(mainBranch, new PushOptions()
{
CredentialsProvider = new LibGit2Sharp.Handlers.CredentialsHandler(Credentials),
OnPushStatusError = new LibGit2Sharp.Handlers.PushStatusErrorHandler(PushStatusError),
});
public LibGit2Sharp.Credentials Credentials(string url, string usernameFromUrl, LibGit2Sharp.SupportedCredentialTypes types)
{
return new LibGit2Sharp.UsernamePasswordCredentials
{
Username = Token,
Password = String.Empty
};
}
public void PushStatusError(PushStatusError pushStatusErrors)
{
System.Diagnostics.Debug.WriteLine($@"{nameof(PushStatusError)} Reference: {pushStatusErrors.Reference} Message: {pushStatusErrors.Message}");
throw new Exception($"PushStatusError: {pushStatusErrors.Message}");
}
LibGit2Sharp.LibGit2SharpException
HResult=0x80131500
Message=request failed with status code: 500
Source=LibGit2Sharp
StackTrace:
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_remote_push(RemoteHandle remote, IEnumerable`1 refSpecs, GitPushOptions opts)
at LibGit2Sharp.Network.Push(Remote remote, IEnumerable`1 pushRefSpecs, PushOptions pushOptions)
at LibGit2Sharp.Network.Push(IEnumerable`1 branches, PushOptions pushOptions)
from libgit2sharp.
I'm having the same issue. Using version 0.30
.
from libgit2sharp.
What fixed it for us is to specify the credentials only on pull but not on push.
from libgit2sharp.
Related Issues (20)
- unexpected EOF when trying to fetch from remote
- Please consider adding AOT support for .Diff.Compare<T>() HOT 19
- How to checkout a specific folder from repository?
- LibGit2SharpException: could not find appropriate mechanism for credentials HOT 5
- FetchOptions in CloneOptions is readonly and has not been set in constructor !
- Git Fetch fails with could not decrypt tls message when TLS 1.3 is allowed
- git 2.40.0 index.skipHash incompatible with libgit2sharp (please update libgit2 from 1.7.1 to 1.8.0)
- the command pull take the class Repository instead of the interface like other commands
- Security Vulnerabilities in git2-106a5f2.dll: Non-Compliance with Secure Hashing and Compiler Security Best Practices HOT 2
- Request - upgrade to libgit2 1.7.2 HOT 1
- the error "too many redirects or authentication replays libgit2shap" come up after upgrading from 0.28 to 0.30 on Fetch HOT 1
- Certificate Verification Failed "unknown certificate lookup failure" HOT 1
- Replace <PackageLicenseFile> with <PackageLicenseExpression>
- CommitLog order does not reflect order of commits.
- Unable to push the commit to the Bitbucket Repository in C# using LibGit2Sharp
- Exception when using it inside a Visual Studio 2022 Extensibility project HOT 2
- SSL error; syscall failure: Connection reset by peer when push 1.3 GB filesize
- Capture error details of "remote unpack failed"
- Disable SSL Certificate Check: 'unknown certificate lookup failure: 33'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgit2sharp.