GDB
GDB

Reputation: 3579

How can I clone Google Cloud Platform repository to Google Cloud Platform VM

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:

Attempts:

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.

Upvotes: 2

Views: 2029

Answers (1)

GDB
GDB

Reputation: 3579

This issue was resolved with a command different than the one provided by Cloud Source Repositories. Problem was related to the fact that my company set up my account - I don't have the creds to manage it. The clone command provided by provided by Cloud Source Repositories included a reference to the account the company set up which was not accepted even though I used gcloud init on the VM.

I tried using the cloud SDK on the VM. This resulted in the clone being successful: gcloud source repos clone [repo-name] --project=[project-name]

My team is just now migrating from on-prem to GCP and we're hitting the occasional speed bump like this.

By the way, most of the references to "credential helper" on the GCP doc related to Docker. That did not seem relevant to the repo issue.

Upvotes: 1

Related Questions