Home
Support Forums

Deployment failed with self-hosted gitlab repo

Our team Netlify account is the business plan.
And we did connect the self-hosted repo(APP ID, ssh key was set up).
Btw, when build, this issue has occurred.

7:52:24 PM: Build ready to start
7:52:26 PM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
7:52:26 PM: build-image tag: v3.8.0
7:52:26 PM: buildbot version: d9a660540b05c414edfc0246347871ef0e3afee9
7:52:26 PM: Building without cache
7:52:26 PM: Starting to prepare the repo for build
7:54:01 PM: User git error while checking for ref refs/heads/main
7:54:02 PM: Creating deploy upload records
7:54:02 PM: Failing build: Failed to prepare repo

7:54:02 PM: Failed during stage ‘preparing repo’: error checking for ref: ssh: connect to host gitlab.idkit.co port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
: exit status 128

7:54:02 PM: Finished processing build request in 1m35.481881319s

As I see, this issue is very specific to Netlify being able to pull via SSH on a different url than the http endpoint.
Is there any way to solve this?

Hi @DarkoArnautov,

Before we dig in further, just to eliminate the primitive causes, could you please confirm if you’ve followed the guide: Self-hosted Git | Netlify Docs?

If that’s all good to go, could you check the permissions on port 22? Like in this thread, they had closed it off: Any way to set custom ssh port for self-hosted Gitlab?.

Hi, Hrishikesh.
Thanks for your response.

Yes, I did follow that guide.
Also, I did check that thread.

But, there is no way to fix this issue.

Hi @DarkoArnautov,

This would be possible with some additional config at the moment. Do you mind sharing your site name or ID or if that should be kept private, we could escalate this to helpdesk.