Skip to content

Private Git repositories support #120

@netandreus

Description

@netandreus

I have local GitLab deployment (on-premise) and using self-signed SSL certificate (as I can issue regulary SSL for the internal domains like git.mycompany.internal). Now I can't add this repo to the OpenCode Manager as it falls with an error "SSH host key verification failed or was rejected by user".

I already added

git config --global http.https://git.mycompany.internal.sslVerify false

but looks like it doesn't work as you have implicit this.verifyHostKeyBeforeOperation(repoUrl) check.

[dev:backend] [2026-02-09T09:37:30.816Z] [INFO]   GIT_TERMINAL_PROMPT: 0
[dev:backend] [2026-02-09T09:37:30.816Z] [INFO]   GIT_SSH_COMMAND: (not set)
[dev:backend] [2026-02-09T09:37:30.816Z] [INFO]   VSCODE_GIT_SSH_HOST_KEY: (not set)
[dev:backend] [2026-02-09T09:37:30.817Z] [INFO] Client client_1770629850817_rzpyye9ey3h connected with directories: (none)
[dev:backend] [2026-02-09T09:37:30.826Z] [INFO] Client client_1770629850817_rzpyye9ey3h subscribed to: /Users/andrey/sandbox/opencode-manager/current/workspace/repos/current
[dev:backend] [2026-02-09T09:37:30.826Z] [INFO] SSE connecting to OpenCode: /Users/andrey/sandbox/opencode-manager/current/workspace/repos/current
[dev:backend] [2026-02-09T09:37:30.838Z] [INFO] SSE connected: /Users/andrey/sandbox/opencode-manager/current/workspace/repos/current
[dev:backend] [2026-02-09T09:37:36.442Z] [INFO] Client client_1770629856442_oofjesksp9 connected with directories: (none)
[dev:backend] [2026-02-09T09:38:53.231Z] [INFO] Creating repo - URL: git@git.mycompany.internal:xxxxx/yyyyyy.git, Provider: auto-detect
[dev:backend] [2026-02-09T09:39:17.300Z] [WARN] Failed to fetch host key for git.mycompany.internal, rejecting connection: Command failed with code 1: # git.wlc.internal:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
[dev:backend] # git.wlc.internal:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
[dev:backend] # git.wlc.internal:22 SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
[dev:backend]
[dev:backend] [2026-02-09T09:39:17.300Z] [ERROR] Failed to create repo: 110 |     }
[dev:backend] 111 |
[dev:backend] 112 |     const verified = await this.verifyHostKeyBeforeOperation(repoUrl)
[dev:backend] 113 |     if (!verified) {
[dev:backend] 114 |       await this.cleanupSSHKey()
[dev:backend] 115 |       throw new Error('SSH host key verification failed or was rejected by user')
[dev:backend]                       ^
[dev:backend] error: SSH host key verification failed or was rejected by user
[dev:backend]       at setupSSHForRepoUrl (/Users/andrey/sandbox/opencode-manager/current/backend/src/services/git-auth.ts:115:17)
[dev:backend]

Could you please add to the the "Add Repository" form small checkbox "SSH host key verification" so I can disable it for such cases?

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions