How to configure private repository on Self Hosted Gitlab with SSH port disabled?

Hi,

I am trying to setup Bitrise with a private repository on a self hosted gitlab where SSH port is disabled. (Sadly, I cant enable it)

With a trick, I have been able to connect gitlab instance with Bitrise successfully following this tutorial. The trick is that I am not a gitlab instance admin and I have added the gitlab application at my user settings level.

Later, when adding application on Bitrise, I am totally unable to fetch repository because SSH port is blocked on our gitlab. Ok. I understand, but i need to make it works :thinking:

I have performed additionals search and found the topic Gitlab Self Hosted. The described solution seems to perfectly fit to my problem. However, I understand that Bitrise has changed since (I mean better Self Hosted Gitlab support) so, I am not sure if it is the right solution now.

So, here are my questions :smiley:

  1. If I create a “Bitrise application” at Gitlab level as explained in the connection tutorial, will it solve “magically” my SSH issue or will I remain stuck ?

  2. I have been able to discuss with our gitlab admin and he advices me to use personal access token or deploy token. I have searched but didn’t find anything indicating that theses methods are supported natively by Bitrise. Please, can you confirm that they are not supported (otherwise, I am very interested into a tutorial.

  3. Eventually, do you confirm that the only solution in my situation is to follow advices given by viktorbeney in this topic ?

Thanks,
Yoan

Hi @Yoan!

As I understand, the issue is that SSH is the main authentication method of Bitrise to access any repository, so the problem isn’t inherently with Bitrise accessing your hosted instance, but with pulling the actual repo. Maybe you could try to authenticate with a .netrc file?

Hi,

Thanks for your answer. Indeed I solved my issue just yesterday. While struggling now with code signing and building issues I planned to come here to give my solution and close this topic.

You’re right, the solution is to use netrc.

Finally, I have followed manual solution given by viktorbeney in this topic
Afterwards, in the workflow editor, I have replace SSH authentication step by the one with netrc. This is the crucial step and it works now like a charm.

I regret that netrc authentication is not proposed during “new app” workflow to manage my case. it would make things easier but everything works now. i can happily test and deploy my app :smiley:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.