semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Fixes ansible-semaphore/semaphore#1195

Open Walkablenormal opened this issue 1 year ago • 2 comments

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.

Walkablenormal avatar Apr 24 '23 20:04 Walkablenormal

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.

image Key without username

image Gitea logs showing that the authentication fails

image Ansible Semaphore task log showing that the fetch fails

The fetch succeeds when the username is set to 'Gitea'.

image Key with username set to gitea

image Gitea logs shows that the authentication succeeds

image Ansible Semaphore task log shows that it succeeds in fetching the repository from the Gitea Git-service

@fiftin Can you review the PR please?

Walkablenormal avatar Apr 28 '23 08:04 Walkablenormal

has that isuue fixed?

Yuri-Lima avatar Jan 02 '24 14:01 Yuri-Lima

any update on this? not being able to use gitea makes semaphore unusable for me

abcd678 avatar Mar 31 '24 21:03 abcd678

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.

Walkablenormal avatar Apr 01 '24 09:04 Walkablenormal

@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.

Walkablenormal avatar Apr 01 '24 10:04 Walkablenormal