hakoerber / git-repo-manager

A git tool to manage worktrees and integrate with GitHub and GitLab
https://hakoerber.github.io/git-repo-manager/
GNU General Public License v3.0
67 stars 9 forks source link

SSH error cloning repositories Gitlab #61

Closed theherk closed 1 year ago

theherk commented 1 year ago

I am using a private Gitlab host, with successful API connection.

Configuration is:

provider = "gitlab"
api_url = "https://gitlab.something"
token_command = "security find-generic-password -w -s gitlab.something -a theherk@gmail.com"
root = "."

[filters]
owner = true
groups = [
  "some/group",
]

This finds all repositories as expected, but on grm repos sync config all the clones yield:

Cloning into "./some/group/repo" from "ssh://git@gitlab.something:2222/some/group/repo.git"
Repository failed during clone: remote rejected authentication: Failed getting response; class=Ssh (23); code=Auth (-16)

But I can git clone ssh://git@gitlab.something:2222/some/group/repo.git without a problem.

~/.ssh/config

Host *
  IdentityFile ~/.ssh/id_ed25519
  UseKeychain yes
  HostKeyAlgorithms ssh-ed25519
  PubkeyAcceptedKeyTypes ssh-ed25519

This is actually taking place in public Gitlab too with the same error.

Maybe related

theherk commented 1 year ago

Oi, wait! Actually, it seems to be that the default MacOS keychain ssh resolution is not appropriate here. If I actually load my key into the agent, the clones work a-okay. Nothing to see here.