In order to push through a pipeline the code to the Google Cloud VM I use the scp command:
scp -r ~/a.txt admin@1x.x.x.x:/home/admin/
When I add the public key (generated on the local machine ) in the user interface : VM instance details -> ssh keys I can use the scp command locally and send data to the server. On the other side if I generate the keys in bitbucket (Repository settings -> SSH ) and I try to add the public key to VM instance details -> ssh keys I get the error:
Invalid key. Required format: <protocol> <key-blob> <username@example.com> or <protocol> <key-blob> google-ssh {"userName":"<username@example.com>","expireOn":"<date>"}
The bitbucket generated keys do not correspond the requirements of Google cloud.
I also tried to store in Bitbucket the local generated key but the pipeline returns
+ scp -r ~/a admin@x.x.x.x:/home/admin/dist/a
Host key verification failed.
lost connection
Furthermore I see when I store the public key via Google Cloud interface (so the scenario which works, the one in which I transfer files fom the local pc to the cloud) there are 3 new keys added to /home/admin/.ssh two of them different from the actual key I added..
Any ideas how to establish a scp connection between Bitbucket and Google Cloud?
Thank you a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.