Question

Je travaille à un projet dans Git. Dans Windows, j'utilise des extensions GIT pour gérer ce projet et pour accéder au référentiel public qu'ils m'ont donné une clé .ppk.Je le charge dans une extension GIT, avec la phrase secrète qu'ils m'ont donnée et ça marche.

Maintenant, je définis une machine virtuelle Linux (Ubuntu-32bit) et je souhaite accéder également à cette machine au référentiel.

d'un autre fil que j'ai vu sur ce site, j'utilise, pour cloner le référentiel, la commande suivante:

ssh-agent bash -c 'ssh-add /home/myHome/mykey.ppk; git clone git@serveraddress:project.git'

Ensuite, la coquille me dit d'insérer la phrase secrète

Enter passphrase for /home/myHome/mykey.ppk:

Mais quand je l'insère, il me dit que c'est une mauvaise phrase phrasophrasée.Je l'ai vérifié beaucoup de fois et je suis sûr que j'utilise la même phrase secrète que j'utilise dans Windows.Alors, comment puis-je utiliser correctement la clé de Linux?

Merci d'avance pour vos réponses.

Était-ce utile?

La solution

The Linux SSH client (typically OpenSSH) can't read the PPK format used by the Windows SSH client Putty. You need to convert the "PPK" key given to you into an OpenSSH key first. Install "putty" on Linux and use the puttygen command line tool:

$ sudo aptitude install putty
$ mkdir -p ~/.ssh
$ puttygen ~/mykey.ppk -o ~/.ssh/id_rsa -O private-openssh

Enter your passphrase, and you'll get an OpenSSH-compatible key in the standard location ~/.ssh/id_rsa. Afterwards you can just use ssh-add(without any arguments!) to add this key to the SSH agent.

Alternatively you can use the PUTTYgen program provided by putty on Windows.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top