abiosoft / abiosoft/caddy-git

Caddy GIT does ignore ports in repo urls for host key

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
206
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I recently encountered a little bug in the git plugin of yours.

When you specify the following service block in the caddy file:

git {
repo ssh://git@git.example.ch:7999/git/repo.git
key /etc/caddy/id_rsa
path /var/www/repo
}

It will try to connect to the correct port, but fetch the wrong SSH host key as it tried to fetch on port 22 (Which is caused the way ssh-keyscan handles ports as you have to pass the port by -p )

As a workaround:
Manually fetch the correct key and then put it into the known_hosts file generated by this plugin.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.