libgit2 / libgit2/libgit2sharp
Getting exception "too many redirects or authentication replays"
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
I am trying to pull from a github repository with the following code getting an exception "too many redirects or authentication replays". Why? If I failed to login, I expect an exception telling me that. Also the exception suggests that it retried whatever it did a couple of times although "replay" needs clarification. Where do I configure the number of retries if any? I have no interest in trying more than once. I have checked the credentials many times and also I tried to pull from an azure devops repo with the same result.
public void dothepulling()
{
string repoPath = "C:\\project\\test.git";
using (var repo = new Repository(repoPath))
{
var FetchOptions = new FetchOptions
{
CredentialsProvider = func
};
var pullOptions = new PullOptions
{
MergeOptions = new MergeOptions
{
FastForwardStrategy = FastForwardStrategy.FastForwardOnly,
FileConflictStrategy = CheckoutFileConflictStrategy.Theirs,
IgnoreWhitespaceChange = false
},
FetchOptions = FetchOptions
};
var signature = new Signature(new Identity("Firstname Lastname",
"my.email.@address.com"), DateTimeOffset.Now);
Commands.Pull(repo, signature, pullOptions);
}
}
private UsernamePasswordCredentials func(string url, string user,
SupportedCredentialTypes types)
{
return new UsernamePasswordCredentials
{
Username = "username",
Password = "password"
};
}
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 con la chiamata fornita a Commands.Pull, i relativi PullOptions.FetchOptions e il callback CredentialsProvider; riproduci l’eccezione contro GitHub o Azure DevOps usando il codice mostrato. Traccia il comportamento risultante di autenticazione o replay e individua se sia necessario chiarire il messaggio, la configurazione dei retry o la gestione degli accessi non riusciti, quindi verifica il comportamento previsto con un test mirato se viene trovata la posizione del test pertinente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, git
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100