Capture error details of "remote unpack failed"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp, git
- Domain
- developer-experience, tooling
Research direction
Start with the PushOptions.OnPushStatusError callback and the remote unpack failure path described in the issue. Reproduce the Azure DevOps secret-scanning rejection and trace where the detailed remote message is lost. Done means callers can receive the remote unpack failure details, including the VS403654 message, rather than only the generic exception.
Written by the indexing model from the issue text.
Description
Reproduction steps
- create Azure DevOps repo with security rules enabled
- create commit which violates server rules. For example
appsettings.json
{
"Parameters": {
"note": "this will trigger secret warning in the Azdo push, which is what I'm testing for",
"secret": "opensesame"
}
}
I configure the repo.Network.Push this way
var po = new PushOptions()
{
CredentialsProvider = (_, _, _) => AzdoCreddentials,
OnPushStatusError = (reason) =>
{
mainLogger.Log(LogLevel.Error, "Push failed with {}", reason.Message);
},
};
Expected behavior
Make PushOptions.OnPushStatusError or another callback to receive details of remote unpack failure similar to git CLI
Specifically error: remote unpack failed: error VS403654: The push was rejected because it contains one or more secrets. in the log below.
PS C:\Dev\dotnet-mirroring\sandbox\pavelsavara-runtime> git push
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 20 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 406 bytes | 406.00 KiB/s, done.
Total 3 (delta 1), reused 3 (delta 1), pack-reused 0 (from 0)
remote: Analyzing objects... (3/3) (27 ms)
remote: Validating commits... (1/1) done (0 ms)
remote: Checking for credentials and other secrets... done (59 ms)
error: remote unpack failed: error VS403654: The push was rejected because it contains one or more secrets.
To https://dev.azure.com/dnceng/internal/_git/pavelsavara-runtime
! [remote rejected] browser_firefox_shm -> browser_firefox_shm (VS403654: The push was rejected because it contains one or more secrets.
Resolve the following secrets before pushing again. For help, see https://aka.ms/1ESSecretScanning.
Actual behavior
LibGit2Sharp.LibGit2SharpException: unpacking the sent packfile failed on the remote with no more details
Version of LibGit2Sharp (release number or SHA1)
0.29.0
Operating system(s) tested; .NET runtime tested
- windows 10
- SDK 9.0.100-preview.1.24101.2
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from libgit2/libgit2sharp
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
libgit2/libgit2sharp#2193 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
libgit2/libgit2sharp#2192 · 1 comment ·
-
Website is down Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
libgit2/libgit2sharp#2191 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
libgit2/libgit2sharp#2189 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
libgit2/libgit2sharp#2187 · 2 comments ·
All issues in libgit2/libgit2sharp
Similar issues
-
Status: Waiting triage Type: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
elastic/esql-dotnet#47 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100