Connection refused: exit status 128

I’ve deployed several sites (Hugo, Jekyll, Gatsby) on Netlify using the ‘Deploy’ buttons found on But now I get the same type of error message and the deploys fail constantly. Just tried to deploy new repos for Middleman and Jekyll. Here’s the latest error:

10:31:46 PM: Build ready to start
10:31:47 PM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
10:31:47 PM: build-image tag: v3.3.5
10:31:47 PM: buildbot version: 2d05064ce3dd2eb95d282a24602ab707dd9581e8
10:31:48 PM: Fetching cached dependencies
10:31:48 PM: Failed to fetch cache, continuing with build
10:31:48 PM: Starting to prepare the repo for build
10:31:48 PM: Failing build: Failed to prepare repo
10:31:48 PM: failed during stage ‘preparing repo’: error checking for ref: fatal: unable to access ‘’: Failed to connect to port 443: Connection refused: exit status 128

This happens on all three of my machines. I haven’t changed any GitHub settings, and I maintain the SSH key pairings. The GitHub repo gets created just fine, and I get notification of the Netlify Deploy Key pairing.

Do I need to control that port?

This is some kind of a bug in the templates or the deploy to netlify button functionality. I’ve asked the team to look into this next week.

You are not doing anything wrong!

1 Like

Ok. Thank you!

I’ll keep a lookout.

An issue has been filed for this. We’ll update here once a fix is deployed. Thank you for your patience.

1 Like

Has this issue been addressed? I am having similar issues deploying my Gitlab repo to Netlify.

7:07:57 AM: [feature enabled]: Nitro deploys enabled. Buckle up! ⚡️
7:07:57 AM: Build ready to start
7:08:03 AM: build-image version: 9cade8af58c2cf3a17a1e9433d2e979149488837
7:08:03 AM: build-image tag: v3.3.5
7:08:03 AM: buildbot version: 77379b6d05a07355f28f6b725fb3c96cb742a426
7:08:03 AM: Fetching cached dependencies
7:08:03 AM: Failed to fetch cache, continuing with build
7:08:03 AM: Starting to prepare the repo for build
7:08:06 AM: No cached dependencies found. Cloning fresh repo
7:08:06 AM: git clone
7:08:07 AM: Error cloning repository:
7:08:07 AM: Failing build: Failed to prepare repo
7:08:07 AM: failed during stage 'preparing repo': exit status 128
7:08:07 AM: Finished processing build request in 4.912398336s


Hi, @stelabouras, and welcome to our Netlify community site. :slight_smile:

The issue above has been resolved so I believe the issue in the deploy logs you posted is something different.

I do see the git clone succeeding for that site now when I checked. Did you resolve the issue on your own? If so, please feel free to share your solution here. If it isn’t resolved, please let us know.

Hey Luke!

It looks that the issue was resolved by renaming two long filenames in my repo: Deploy fails with "Failed during stage 'preparing repo': exit status 128"

Thanks for the explanation, @stelabouras.