Hello,
I tried to connect to ssh with pipelines, but got this error :
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
Permission denied, please try again.
I used the bitbucket keys, and installed them on my server.
Was wondering if it could from the docker image. I used the default one.
Any suggestion ?
Thanks
For those who ask, the only thing that worked for me is to use ssh-agent (see the answer before : I can't copy and paste it here because of the spam filters of this forum)
In my case I forgot to fetch fingerprint from the server I'm trying to SSH.
You can fetch fingerprint on the same page where you added the SSH keys: Settings->Pipeline->SSH Keys.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same here. I got that error after changing the server domain name and forgot to fetch the new fingerprint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I struggled with this for a day and followed all the comments without it working.
The one thing that eventually worked for me was letting bitbucket create the private and public keys and using those instead of the ones I created myself.
I then added the public key (as it says ) to the server's `~/.ssh/authorized_keys` file (as a new line)
It all then worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! This worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could ssh my ubuntu server without any problem after having created a key in bitbucket pipelines as describred in doc.
I use the node:6.9.4 image and simply added
ssh -t user@my.server.org "cd /var/my/path ; yarn install -prod"
in my pipeline script.
Did you add the target server in known_hosts ?
What is the line in the script that throws the message ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer.
I didn't add the target server in known_hosts because bitbucket asks for the key fingerprint of the server. I thought it was sufficient.
But I finally managed to make it work by adding :
- eval `ssh-agent -s` - ssh-add ~/.ssh/id_rsa - ssh-add -l
before the ssh command, if I use a custom made key.
This trick doesn't work for bitbucket keys, but I should try to add this known_hosts file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So I had a look, and know_hosts contains the good server key.
I tried your image and it seemed to change something but I think my server is rejecting my IP now after too much tries...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You do not need to provide to Bitbucket the key fingerprint of your server; it is computed using the address (or name) you provide in Pipeline settings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, you provide the server, and you fetch the fingerprint. Then bitbucket add it to the known_hosts (I checked and it is what it does).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, so I retried what you told me, and it still doesn't work. I will stick to ssh-agent then...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is linked to the fact that bitbucket SSH key has provided a passphrase. So I need to enter this passphrase (which I don't know) in order this to work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The first line is resolved by adding -T to the ssh command, whic removes the need for an interactive terminal.
Stays the ssh_askpass command ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.