HTTPS access to private Git (Gogs) Repository

We are hosting our own internal git repository using gogs. Due to company security constraints we are not allowed to offer SSH access from the internet. It is only allowed to use HTTPS connections.

Ist it possible to connect to the repository using HTTPS or is bitrise only supporting SSH?

Hi @kandlinf ,

You can use the Authenticate host with netrc step for that. (Authenticate host with netrc v0.9.0 / https://github.com/bitrise-steplib/steps-authenticate-host-with-netrc )

The exact configuration depends on your server.

Simply use this Step instead of the Activate SSH Key one (unless you also want to activate an SSH key. The steps are not incompatible with each other, the same as you can use SSH keys and passwords at the same time on your own Mac/PC too. The Activate SSH Key step can be used for SSH key activation, while the netrc one for password auth).

If you’d have any questions just let us know! :slight_smile:

1 Like

@viktorbenei Hey Viktor,
Is it also possible somehow to add an application on bitrise.io using only the workflow steps and not project scanner? Because in case of using only netrc it seems impossible. Please correct me if I’m wrong. :slight_smile:

Hey @viplord,

You can skip the project scanner and assemble your own workflow. Just follow this guide: http://devcenter.bitrise.io/adding-a-new-app/setting-up-configuration/#skipping-the-scanner-full-manual-configuration

In case your source code is only available through HTTPS auth, feel free to add any of our sample applications as the source repo, then (once the initial setup is finished) change the source repository URL in the application settings.

2 Likes

@ghaabor is right (of course :wink: ). Just one note: you can also generate a bitrise.yml locally on your Mac/Linux, using the Bitrise CLI.

Simply run bitrise init in the root of the repository and answer the questions. It’s the same scanner bitrise.io runs, so once it finishes you can upload the bitrise.yml to bitrise.io .