Search code examples
fluttergoogle-cloud-platformgoogle-cloud-source-reposcodemagic

How to connect Google Cloud Source Repo with Codemagic?


Codemagic is a build service for flutter applications it has built in support for bitbucket, github, etc. However it also supports linking repositories from other sources. To set this up you they ask you for a specificish format. URL should be in the following format: https://example.com/username/repo.git or [email protected]/username/repo.git.

I'm trying to figure out how to provide a url for my google cloud source repo in this format. I've tried this https://source.developers.google.com/p/[project-name]/r/[repo-name/ but then it complains about credentials. If I use the '[email protected]/.....' format I get an option to load an ssh key to authenticate and that passes verification but it doesn't correctly register/see the repo at the endpoint so something is off.

Anyone ever done this before. I've seen something about signed urls with google cloud and thought maybe I could use the https: format both make a signed url though everything i've seen with signed urls has to do with cloud storage and not cloud source.


Solution

  • I was able to add Google Cloud Source Repo to Codemagic using next link

    ssh://[email protected]@source.developers.google.com:2022/p/woven-voyage-xxxxx/r/test
    

    You need also register your SSH key https://source.cloud.google.com/user/ssh_keys?register=true