I have a bitbucket account. I'm trying to build pipelines using sftp deploy, the problem comes when I change my ssh port. When I commit, the output deployment fails.
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server-> client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client-> server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256: WgnXplwkwYNXMVdzcKpILAlYZJ43Y7mm / qMNdHyZ7Fk
debug1: checking without port identifier
Host key verification failed.
Connection closed
Connection closed.
+ STATUS = 255
+ set -e
+ [[255 == \ 0]]
+ file 'Deployment failed.'
+ echo -e '\ e [31m✖ Deployment failed. \ e [0m'
+ exit 255
✖ Deployment failed.
This is my bitbucket-pipelines.yml config.
image: python: 3.7.3
pipelines:
default:
- step:
name: Build and test
caches:
- pip
script:
- pip install - upgrade pip
- git clone git@bitbucket.org: linuxteknosia / codeku.git
artifacts:
- my code / **
- step:
name: Deploy artifacts using SFTP to PROD
deployment: production
script:
- pipe: atlassian / sftp-deploy: 0.5.0
variables:
USER: $ USER
SERVER: $ SERVER
SSH_KEY: $ SSH_KEY
REMOTE_PATH: '/ var / www / html'
LOCAL_PATH: 'my code / *'
DEBUG: 'true'
EXTRA_ARGS: '-P 999'
Strangely, when the ssh port uses port 22, the config is successfully committed to the server. Can you help where the fault lies?
Hi @linuxteknosia , try adding your host:port to the list of known hosts in pipelines settings, as described here https://community.atlassian.com/t5/Bitbucket-questions/Use-non-22-SSH-port-in-pipelines/qaq-p/585622 .
Go to the Repository settings > Pipelines > SSH Keys , enter the host:port into the 'Host address' field under the Known hosts section and click Fetch. This should add and known_hosts entry with a specific port number.
If the above steps don't help, try removing all entries from known hosts settings and add fresh fingerprints instead.
Right, thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm having same issue. put host:port gets the fingerprint and i can add the host. but the pipeline process don't work, i got "Host key verification failed". if i put just the host without port, the fingerprint is not found.
remove entries from known hosts and add again, doesn't help
any ideas?
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.