abiosoft / caddy-git

git middleware for Caddy

Home Page:http://caddyserver.com/docs/http.git

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local git repo

pgaskin opened this issue · 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.

Can you give examples ?

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.

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

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

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

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

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

Yes, I am aware of that.

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.

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?

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?

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.