plugin-git icon indicating copy to clipboard operation
plugin-git copied to clipboard

Custom port for cloning

Open JStyle21 opened this issue 8 months ago • 2 comments

Hi,

I have a forgejo + woodpecker setup, due to constraints it's running on http on a custom port So forgejo is 9001 and it's ssh is 9002, then i have a reverse proxy to change the sub path so the url would look like http://domain:9001/forgejo http://domain:9001/woodpecker

I've set it up like this and it seems fine until i try to run a pipeline, when i do it's trying to clone over http via port 80 and i didn't find a way to control it and if i switch to ssh and add the keys etc. i get Host key verification failed. because it's not a known host, which i also didn't find a way to add.

So how can i fix it?

JStyle21 avatar May 28 '25 01:05 JStyle21

Ok i think i've solved the http issue by adding the port to the ROOT_URL for forgejo then it's inherited to the clone url and the plugin picks it up from there

As for the ssh, adding use-ssh: true fixed the host issue but now i have the key path issue as many described in other tickets

JStyle21 avatar May 28 '25 22:05 JStyle21

Can anyone explain the ssh path thing? As written in this issue https://github.com/woodpecker-ci/plugin-git/issues/231

i don't want to create the key in the container i want to pass it as an env var so it will exist in the container is that not possible currently?

JStyle21 avatar May 28 '25 22:05 JStyle21

is that not possible currently

Yes this is not supported.

qwerty287 avatar May 29 '25 13:05 qwerty287

I'm closing this as the original issue seems to be resolved

qwerty287 avatar May 29 '25 14:05 qwerty287