0

I am trying to run gitlab on Google Cloud Platform. I followed this tutorial: https://docs.gitlab.com/ce/install/google_cloud_platform/index.html but now I am at the point when I cannot push the commit to the remote.

[email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

The SSH key is added to the Google Cloud Platform VM as well as Gitlab account. I believe I have to enable git over ssh somehow but not really sure how these things go with Google Cloud Platform's security.

2
  • have you tried SSH-ing into the machine using gcloud so that it can add the instance to your list of known hosts? gcloud compute --project "project-name" ssh --zone "europe-west2-c" "instance-name" Commented Mar 18, 2018 at 9:22
  • Added my key manually in VM management and SSH under my username worked. The command you mentioned worked too, I think there has to be some way to add git user too. Not really sure how this works though. Commented Mar 18, 2018 at 9:36

1 Answer 1

2

So the problem was somewhere else.

I recently changed the IP address of the VM (to have a static one). Unfortunately, I forgot to change the IP in GitLab settings so the clone links are still pointing to the old one. Hence the Could not read from remote repository.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.