Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: debugging git error "invalid auth method" #21

Open
polds opened this issue Feb 24, 2023 · 0 comments
Open

question: debugging git error "invalid auth method" #21

polds opened this issue Feb 24, 2023 · 0 comments
Assignees

Comments

@polds
Copy link

polds commented Feb 24, 2023

I'm looking for ways to better debug the git error invalid auth method, I'm not entirely sure what the error is meaning and I'm pretty sure I have everything set up correctly.

I'm using caddy-git 1.0.7 with Caddy 2.5.0 (this version because I hit the error mentioned in #19 on a newer Caddy).

This is my Caddyfile verbatim:

{
    order git before reverse_proxy

    auto_https off

    git {
        repo website {
            base_dir /mnt
            url {env.REPO}
            auth key /.ssh/id_rsa passphrase {env.SSH_KEY_PASSPHRASE}
            webhook Gitlab X-Gitlab-Token {env.WEBHOOK_SECRET}
            branch master
            post pull exec {
                name Pager
                command /usr/bin/echo
                args "pulled repo"
            }
        }
    }
}

:80 {
    route /webhook {
        git update repo website
    }

    reverse_proxy {
        to localhost:1313
    }
}

I have verified the environment variables are injected and available. I have verified that the id_rsa key is available - I get a different error if it's not found.

I am trying to clone a Gitlab private repo in the form of [email protected]:/.git

These are the Caddy errors I see when starting:

{"level":"info","ts":1677257928.3675237,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1677257928.3699372,"logger":"git","msg":"provisioning app instance","app":"git"}
{"level":"error","ts":1677257928.552225,"logger":"git","msg":"failed managing repo","repo_name":"website","error":"invalid auth method"}
{"level":"error","ts":1677257928.552259,"logger":"git","msg":"failed configuring app instance","app":"git","error":"invalid auth method"}
run: loading initial config: loading new config: loading git app module: provision git: invalid auth method

Hopefully I'm missing something silly - any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants