Issues when interacting with azure devops repos
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 1.7k
- Forks
- 408
- Merge moyen
- 2 j 57 min
- PR mergées (30 j)
- 7
Description
Hello,
We are using pygit2 (1.15.0) against repositories hosted on azure devops, and have started seeing issues lately as Microsoft are phasing out ssh-rsa keys: https://devblogs.microsoft.com/devops/ssh-rsa-deprecation
The error message I get when I for example try to clone a repository is this:
_pygit2.GitError: remote: Command git-upload-pack: You’re using ssh-rsa that is about to be deprecated and your request has been blocked intentionally. Any SSH session using SSH-RSA is subject to brown out (failure during random time periods). Please use rsa-sha2-256 or rsa-sha2-512 instead. For more details see https://aka.ms/ado-ssh-rsa-deprecation.
remote: ERROR_SSH_UNSUPPORTED_CIPHER (7)
I have created a new ssh-key according to the specs that Microsoft advice (ssh-keygen -t rsa-sha2-512) and use this key when trying to clone. If I do a manual git clone using the same key, it works without any errors. I have tried to dig into the pygit2 code in order to figure out what is going on but I am stuck.
Any ideas what could be causing this?
Here is the tiny python program that I use for testing:
import pygit2
...
keypair = pygit2.Keypair(username, public_key, private_key, passphrase)
callbacks = pygit2.RemoteCallbacks(credentials=keypair)
pygit2.clone_repository(repo_url, "test", callbacks=callbacks)
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le reproducteur Python utilisant pygit2.Keypair, RemoteCallbacks et clone_repository, puis comparez sa négociation SSH avec le git clone manuel qui réussit en utilisant la même clé. Suivez l’endroit où l’algorithme SSH est sélectionné et reproduisez l’échec d’Azure DevOps. Le travail est terminé lorsque le clonage du dépôt réussit avec rsa-sha2-512 sans l’erreur SSH-RSA.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- git, python
- Domaine
- authentication, networking
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100