Project - Git ssh sync with custom port

Hello,

I have

  1. installed NodeRed and Gitea on my local Docker Swarn cluster
  2. setup a git key on NodeRed
  3. setup the associated public key on Gitea
  4. setup a remote repository on NodeRed project with this URL: "ssh://git@gitHost:gitPort/gitUser/gitRepository.git"

When I test on the NodeRed container with ssh command, all works fine:

ssh -i ./sshKey -T -p gitPort git@gitHost

But, on NodeRed UI, the connection with remote repository is not possible.
On browser network tab, an error occurs on "/projects/xxxx/branches/remote" request with the following detail:

"git@gitHost: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"

I think the porblem occurs because the git server listen on a custom port.
Could you confirm this?

Many thanks for your help.

Hello everybody,

I have found a workaround for this behaviour:
On NodeRed container, I clone the desired Git repository with the "git clone" command on the "/data/projects" folder and then I can sync via ssh protocol on NodeRed UI.

For your information, you can find the complete git command:

git clone ssh://git@gitHost:girPort/gitRepo.git --config core.sshCommand="ssh -i sshKey"

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.