I set up a simple pipeline to do some testing. Previously, it had been working fine. Now, when I try to run a pipeline script, it hangs on 'my_known_hosts' not existing. Known hosts have been fetched and added to the repo. I've even tried with fresh repositories, but still the same error. Here's what I have in my yml config file:
image: atlassian/default-image:1
pipelines:
default:
- step:
script:
- mkdir -p ~/.ssh
- cat my_known_hosts >> ~/.ssh/known_hosts
- (umask 077; echo $[MY_STORED_KEY] | base64 --decode > ~/.ssh/id_rsa)
- sftp [myuser]@[myhost]:[mydirectory] <<< $'put -r *'
Here is the error I receive:
+ cat my_known_hosts >> ~/.ssh/known_hosts
cat: my_known_hosts: No such file or directory
Is this issue still occurring? (Just wondering if this was a bug that was fixed)
Also, you may want to check out this guide at some stage for a more straight forward way of setting up SSH keys: https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.