semaphore
semaphore copied to clipboard
Fixes ansible-semaphore/semaphore#1195
When using a self-hosted Git service like Gitea there is a need for the SSH-connection to use a different username then 'git'.
This fix will check if the optional username field of the configured SSH-key is set. If it is, it will use the set username when establishing the SSH-connection. When it is not set, it falls back to using 'git' as the username.
Tested this against a locally set up Gitea Git-service.
It fails to fetch the repository from the Gitea Git-service when no username is set in the key because it falls back to 'git' as the username. Gitea expects the username to be Gitea.
Key without username
Gitea logs showing that the authentication fails
Ansible Semaphore task log showing that the fetch fails
The fetch succeeds when the username is set to 'Gitea'.
Key with username set to gitea
Gitea logs shows that the authentication succeeds
Ansible Semaphore task log shows that it succeeds in fetching the repository from the Gitea Git-service
@fiftin Can you review the PR please?
has that isuue fixed?
any update on this? not being able to use gitea makes semaphore unusable for me
any update on this? not being able to use gitea makes semaphore unusable for me
Hey,
This PR should fix this issue. The maintainers need to merge this PR into the codebase.
@fiftin I've merged the latest version of the codebase into this PR to solve any merge conflicts. All tests run without any problems. Can you look into this PR and merge it? People really seem to need this fix.