libgit2 / libgit2/libgit2sharp
"invalid version 0 on git_proxy_options" thrown when natives are built from source
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 3.5k
- Forks
- 925
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi, I'm currently trying to make a custom build that uses libssh2 instead of exec for SSH, since I don't want OpenSSH windows to spawn as my program makes requests. I changed this flag, then followed through the rest of the compilation steps both for native binaries and lg2s.
I then tried pulling, not on a proxy, using this code:
var fOptions = new FetchOptions ();
fOptions.Prune = UpdaterMod.settings.pruneOld;
var mOptions = new MergeOptions ();
mOptions.CommitOnSuccess = true;
mOptions.FileConflictStrategy = UpdaterMod.settings.onFileConflict;
var sig = new Signature (new Identity (modName, email), DateTimeOffset.Now);
try {
string logHolder = "";
Commands.Fetch (repo, remote.Name, refSpecs, fOptions, logHolder);
if (logHolder.Length > 0)
LogMsg (logHolder, LogMode.Warn);
}
catch (Exception e) {
LogMsg ($"Could not fetch data from remote repo: {e.Message}", LogMode.Error);
return;
}
Expected behavior
The program should attempt to pull without trying to use a proxy.
Actual behavior
The caught exception contains the message in the title.
System information
Windows 10 10.0.19045
AMD Ryzen 5 3600
Other useful information
This issue persists when the flag is switched back to exec
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne beim Aufruf Commands.Fetch mit FetchOptions im gemeldeten Windows-Build und verfolge dann, wie der native Build Proxy-Optionen und die Versionsvalidierung behandelt. Reproduziere den Fetch mit den Konfigurationen custom und exec; abgeschlossen ist die Arbeit, wenn ein Fetch ohne Proxy nicht mehr die gemeldete Ausnahme wegen einer ungültigen Version auslöst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, git
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100