Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why can't I add the bitbucket key to Google Cloud?

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!

1 answer

Hi,

 

Did you manage to resolve this? I am facing the same issue with no resources to help.

 

Kind regards,

M

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,477 views 4 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you