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

Local git repo

Open pgaskin opened this issue 7 years ago • 12 comments

caddy-git does not work properly with a path to a bare git repo as the repo url. This is useful for using caddy to serve git repos on the same server.

pgaskin avatar Feb 21 '18 19:02 pgaskin

Can you give examples ?

abiosoft avatar Feb 22 '18 10:02 abiosoft

I use Gitea on the same server as caddy, and I want to serve a private repo from the bare repo in the Gitea data folder.

pgaskin avatar Feb 22 '18 15:02 pgaskin

Yeah, that makes sense. I'm actually referring to example repo URL that is failing.

abiosoft avatar Feb 22 '18 15:02 abiosoft

/srv/gitea/repositories/geek1011/whatever.git

pgaskin avatar Feb 22 '18 15:02 pgaskin

why not http://127.0.0.1/whatever.git ?

abiosoft avatar Feb 22 '18 15:02 abiosoft

Because the repo is private, I don't want to put my ssh key on the server, and gitea is proxied through caddy (so it would deadlock).

pgaskin avatar Feb 22 '18 16:02 pgaskin

Now I understand better. But that will be limited to long polling, webhooks can't work.

abiosoft avatar Feb 22 '18 16:02 abiosoft

Yes, I am aware of that.

pgaskin avatar Feb 22 '18 16:02 pgaskin

same issue here. I'm using gogs to serve git repos proxied by caddy itself. With this configuration I cannot use this git directive to pull from a git repo served by caddy itself :) and there's no file:// support neither so I cannot find a workaround.

lesion avatar Jul 23 '18 22:07 lesion

I'm having a similar issue.
I use caddy to proxy my gitlab installation and I cannot use this plugin because it tries to pull the repo before gitlab is available through caddy.
Would it be possible to add an option to not pull the repos at launch?

csos95 avatar Nov 05 '18 11:11 csos95

If this would resolve the issue then yeah, it can be added.

Would it be possible to add an option to not pull the repos at launch?

abiosoft avatar Nov 13 '18 07:11 abiosoft

I'm not sure if it will resolve the initial issue of wanting to pull a local repo from the filesystem, but it would solve the issue @lesion and I have of wanting to pull from a gogs/gitlab install on the same server.

csos95 avatar Nov 14 '18 18:11 csos95