gitea: Webhooks are not triggered in repositories cloned via ssh
Description
I have a repository with a webhook configured on push events.
The hook is correctly triggered if I click “Test Delivery”, and also when the repository is cloned over HTTPS. If I perform code changes from the web view the webhook is also correctly triggered.
However, if I cloned the repo over git@git.example.com:user/repo.git and I push some commits, the hook is not triggered at all. No log traces on the target webapp, no log traces on gitea, no log traces on the nginx proxy.
Am I missing some obvious configuration? Are webhooks actually supported when the events are triggered from an ssh-cloned repo, or do I have to use git hooks for this purpose? If so, is there an easy way to map git hooks to web hooks?
Gitea Version
1.16.8
Can you reproduce the bug on the Gitea demo site?
N/A
Log Gist
No response
Screenshots
No response
Git Version
2.37.0
Operating System
Arch Linux
How are you running Gitea?
Self-hosted on an Arch Linux server, installed via Arch package.
Database
PostgreSQL
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (9 by maintainers)
I may have found the culprit buried deep in my
sshd_config:It seems that in one of my previous attempts to get SSH access to work for git I added that line to the configuration. My guess is that it bypassed the PAM authentication when no password was provided, so the
commandwas never actually called.After removing that configuration and resetting the git shell to /bin/bash things seem to work as expected: