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

Another git repo exists / remote: Not Found

queicherius opened this issue · comments

I cloned my repo like this:

git clone git@github.com:queicherius/david-reess.de.git /projects/david-reess.de/

Then I created a caddyfile like this:

david-reess.de {
  root /projects/david-reess.de
  gzip
  minify

  git git@github.com:queicherius/david-reess.de {
    hook /git-webhook some-secret
  }
}

Starting caddy this fails with:

another git repo 'git@github.com:queicherius/david-reess.de.git' exists at /projects/david-reess.de

When deleting /projects/david-reess.de it fails with:

remote: Not Found
fatal: repository 'https://git@github.com:queicherius/david-reess.de.git/' not found

Any pointers? This seems like a really cool plugin.

Change the URL scheme to https except you're using ssh key, so it becomes https://github.com/queicherius/david-reess.de.

You can let the plugin do the repo cloning, or ensure you clone with same URL scheme as the one in the config file.

I'm using an SSH key, since I want to use it with private repos too and this was a test. Do I manually have to define the SSH key?

Yes, using key config. Check docs and example at https://caddyserver.com/docs/http.git.

Thank you, that worked! Sorry, I read over the required for private bit. Appreciate the quick help. 👍