Source control failed to connect error: n8n upgrade error

Hey team,

We upgraded to enterprise version and we started getting this error, I checked in community it states that our GIT repository is not getting sync. i lost my environnement connexion -Source control failed to connect.

How to resolve and will it affect my version control if this was not resolved as I dont have env access with me. Self hosted .

@automationBug source control breaking right after an upgrade usually means the SSH key n8n uses for git doesnt match whats on the repo provider side anymore — either the container regenerated it during upgrade, or the volume mount lost the .ssh dir.

quick check: go to Settings → Source Control in n8n, look for the public SSH key block at the top, copy it. then in ur git provider repo settings → Deploy Keys, compare against what u had registered before. if its a new key, just re-add it with read+write access and reconnect from n8n.

on the “will it affect version control if unresolved” part — workflows keep running fine without source control, u just lose the push/pull sync between environments. production stays up, no rush, u just cant promote changes thru git until reconnected. which provider u on (github/gitlab/bitbucket)?

Hi @automationBug

The “Source control failed to connect” error means the digital “handshake” between your n8n server and your Git repository (like GitHub or GitLab) has been broken. This often happens after an upgrade because the security keys or passwords used to keep them connected need to be refreshed or re-entered to prove the server still has permission to access your code.

To fix this, an administrator needs to go into the n8n settings and reconnect the repository. This usually involves either updating a password (token) or generating a new security key (SSH key) in n8n and pasting that key into the settings of your Git repository. Once these “keys” match again, the connection will be restored.

Regarding your data, you haven’t lost anything—the workflows already saved in Git are safe, and the ones currently in n8n are still there. However, they are no longer talking to each other. This means any new changes you make right now aren’t being backed up, and you cannot pull updates from other team members until the connection is fixed.

Source control breaking right after an upgrade is almost always the SSH key. The upgrade either regenerated the container key or the volume mount lost the .ssh directory, so the key n8n presents no longer matches the deploy key on your git provider.

Check: Settings, Source Control in n8n shows the public SSH key. Compare it against the deploy key registered in your repo provider settings. If it is a new key, re-add it with read and write access and reconnect.

On your worry about it being unresolved: your workflows keep running fine without source control, so nothing is broken in production. But you have lost your push and pull sync, which means no backup of changes and no rollback path until it reconnects. I would treat it as urgent for that reason, not because anything is down right now. Working without a safety net is the risk here.