GCP Cloud Function source_repository syntax:

Came across the same issue. I fixed this by setting the source_repository_url in the following format:

https://source.developers.google.com/projects/{{project_name}}/repos/{{repository_name}}/moveable-aliases/master/paths/functions/{{function_name}}

  1. {{project_name}} is the name of your project
  2. {{repository_name}} is the name your cloud source repository
  3. The code of the function was located inside functions/{{function_name}} so this will probably be different for you.

If this still doesn’t work you can do the other approach. Create a demo function and set the repository there. After that manually get it by running the following gcloud command for example.

gcloud functions describe demo --region=europe-west2