Skip to main content
All CollectionsKnowledge BaseGeneral issues
Forcing Git to use SSH URLs on Bitrise VMs
Forcing Git to use SSH URLs on Bitrise VMs
Updated over a week ago

Issue:

You want to force Git to always use SSH URLs for GitHub repositories on the Bitrise virtual machines.

Possible solution:

You can instruct git to use the SSH git clone URL (git@...) instead of HTTPS one (https://) in every case, regardless of other settings, such as your Cocoapods specs.

  1. Add a Script Step to your Workflow.

  2. In the Script content input, add the following:

    git config --global url."[email protected]:".insteadOf "https://github.com/"

This instructs git that in every case when the git clone URL starts with https://github.com/, it should replace it with [email protected]: before contacting the server.

Please note that this affects every git operation after running this git config for github.com repositories! It will always convert the URL and will use the SSH URL instead for github.com repos.

Additional information:

Did this answer your question?