libgit2 / libgit2/libgit2sharp
"invalid version 0 on git_proxy_options" thrown when natives are built from source
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 3.5k
- Fork
- 925
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dalla chiamata Commands.Fetch con FetchOptions sulla build Windows segnalata, quindi segui come la build nativa gestisce le opzioni proxy e la convalida della versione. Riproduci il fetch con le configurazioni custom ed exec; il lavoro è completato quando un fetch senza proxy non genera più l’eccezione di versione non valida segnalata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, git
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100