I would like to clone GCP "Cloud Source Repositories" in AWS instance using GCP service account(IAM). I wanted to close using "git clone" command. Please let me know how to do it?
Asked
Active
Viewed 398 times
1 Answers
0
You can find the find the official documetation Cloning a repository.
You can clone using SSH authentication, Google Cloud SDK or Manually generated credentials.
I was able to clone the Cloud Source Repo to AWS:
I generate the ssh keys:
ssh-keygen -t rsa -C "user@support.com"
I register a public key link.
I cloned the repo:
git clone ssh://useri@support.com@source.developers.google.com:2022/p/project/r/test

marian.vladoi
- 7,663
- 1
- 15
- 29
-
I already read this official documentation. "git clone" command won't work with "Service Account". We have to use google cloud SDK command like below gcloud source repos clone flux --project=
– Saran Nov 07 '19 at 10:18 -
Why would you need a service account? Do you want to have some cloud function that will perform this task or do you want to clone from AWS instance? – marian.vladoi Nov 07 '19 at 12:16