Vorrei utilizzare Jenkins con un repository su Bitbucket. Per questo, ho creato una chiave ssh con l'utente jenkins
e il comando ssh-keygen -t rsa -C "my_email"
. Ho aggiunto la chiave pubblica su Bitbucket e posso clonare un progetto con git clone ...
.Autenticazione con Jenkins e Git
Ma quando ho configurare il progetto di Jenkins, ho messo l'url [email protected]:my_username/my_repository.git
Ecco l'errore:
Failed to connect to repository : Command "git ls-remote -h [email protected]:skurty/ma-carte-augmentee-bo.git HEAD" returned status code 128:
stdout:
stderr: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Se lo faccio ssh [email protected], ottengo:
PTY allocation request failed on channel 0
conq: logged in as my_username.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
Connection to bitbucket.org closed.
Ho anche provato a creare il file ~/.ssh/authorized_keys
e inserire la chiave pubblica, ma lo stesso problema.
I Jenkins anche rinnovate con sudo /etc/init.d/jenkins restart
Grazie per il vostro aiuto :)
PS: Sono su una Debian Squeeze 64 bit
Sì, ho creato la chiave con le Jenkins utente in/home/Jenkins /.ssh e id_rsa si trova in /var/lib/jenkins/.ssh (con authorized_hosts ...). I diritti sulla cartella e sul file sono ok. – skurty