'Too many redirects or authentication replays' on clone from TFS
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- csharp, git
- Área
- authentication, backend, networking
Línea de trabajo
Comienza con la llamada a Repository.Clone y su CredentialsProvider en la reproducción proporcionada, y luego compara la solicitud con el comando git funcional que envía un encabezado Authorization Bearer. Reproduce el clone contra TFS e inspecciona si se envía ese encabezado; se considera terminado cuando el clone autenticado con access token se completa sin errores de redirect ni de authentication replay.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
After updating to Team Foundation Server TFS 2018 & 2017 Update 3, we are not be able to login to GIT repository using LibGit2Sharp library using Access Token. Please check the code below:
`
string accessToken = "eyJ0eXAiOiJKV1QiLCJ...";
NetworkCredential gitCredentials = new NetworkCredential(string.Empty, accessToken);
string localRepoPath = string.Empty;
string gitTfsRepo = "http://mjtfs2017:8080/tfs/DefaultCollection/_git/GITTest001";
try
{
localRepoPath = Repository.Clone(gitTfsRepo, @"D:\temp\GIT",
new CloneOptions()
{
CredentialsProvider = GetCredentialsHandler(gitCredentials),
IsBare = false
});
}
catch (Exception err)
{
Console.WriteLine(err);
}
Console.WriteLine(localRepoPath);
`
I communicated with Microsoft TFS/VSTS Team they gave following response:
The fact that you received those responses from the code snip I provided means that your extension is correctly configured (regarding scopes at least) and TFS is correctly accepting the extension’s access token to perform git operations through HTTP, when the git client sends it.
Additionally, if I use the next command, using git for Windows, I’m able to fully interact with a TFS repo with that access token:
git -c http.extraheader="Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJ..." clone http://at1-tfs-test1-angallo.westus2.cloudapp.azure.com:8080/tfs/DefaultCollection/_git/test_project_1
But that same command doesn’t work for git for Linux, probably because my git client on my Linux machine doesn’t send or correctly consider these HTTP headers (just as LibGit2Sharp seems to not do too (from your latest Fiddler trace I still see the Authentication header missing)). So I still believe the problem here comes from the git client, not TFS or the access token.
Please suggest, thanks in advance.
LibGit2Sharp version: 0.26.0-preview-0027
- Lenguaje dominante
- C#
- Estrellas
- 3.5k
- Forks
- 925
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de libgit2/libgit2sharp
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
libgit2/libgit2sharp#2193 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
libgit2/libgit2sharp#2192 · 1 comentario ·
-
Website is down Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
libgit2/libgit2sharp#2191 · 2 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
libgit2/libgit2sharp#2189 · 1 reacción ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
libgit2/libgit2sharp#2187 · 2 comentarios ·
Todos los issues de libgit2/libgit2sharp
Issues similares
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
azurenoops/spin_agent#975 ·
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SubtitleEdit/subtitleedit#15108 · 1 comentario ·
-
area/docs-content Bug pulumi/docs
Dificultad 1/5 1-3 horas Aptitud para principiantes 94/100