Can't clone a Google Cloud Platform repository to a Google Cloud Platform VM
Issue: When I attempt to clone I get "Permission denied (publickey)"
Setup:
- Created an SSH key pair on the VM
- In the Google Cloud Platform VM edited the instance details via the dashboard, added the key, and saved it
- Started the VM and confirmed in the instance details that the key was registered.
- On the Cloud Source Repositories dashboard for my repo registered the public key
Attempts:
- Connected to the instance via ssh from my local terminal, confirmed again that the key existed then attempted to clone the repo. Same permission denied result.
- Connected to the instance via the terminal created by the remote access button on the GCP instance details dashboard. Same permission denied result.
The keys on my local machine are also registered with Cloud Source Repositories and I am able to clone the repo into my local machine without any problem.