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

Print usefull error message if auth failed #25

Open
6543 opened this issue Jun 20, 2022 · 3 comments
Open

Print usefull error message if auth failed #25

6543 opened this issue Jun 20, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@6543
Copy link
Member

6543 commented Jun 20, 2022

fatal: could not read Username for 'https://<url>': No such device or address
exit status 128 

does not tell you that it simply try to clone without password but it failed because it needs one

@6543 6543 added the enhancement New feature or request label Jun 20, 2022
@FredeEB
Copy link

FredeEB commented Jun 25, 2022

I'm hitting this, do you happen have a solution for this issue?
If I understand it correctly, git is trying to clone with http, but failing due to authentication, I feel like it should be allowed to if you register with your forge through oauth2.

e.g I use gitea, and log in to woodpecker with oauth, which works, and woodpecker correctly lists all repos related to my account, however when it tries to actually clone the repo, it fails with the above when trying to access https://<hostname>/<owner>/<repo>//info/refs?service=git-upload-pack.

Also as as side note, is there a way to use ssh for cloning?

@khmarbaise
Copy link

I have observed the same issue (Using 2.X of the git plugin) and adding some logging output of the server side:

{"level":"error","error":"signature is invalid","time":"2022-12-25T16:20:43Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/api/hook.go:131","message":"failure to parse token from hook for test/test"}
{"level":"info","ip":"172.19.0.2","latency":4.25749,"method":"POST","path":"/hook","status":400,"time":"2022-12-25T16:20:43Z","user-agent":"Go-http-client/1.1","time":"2022-12-25T16:20:43Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/router/middleware/logger.go:45"}
{"level":"error","error":"signature is invalid","time":"2022-12-25T16:20:43Z","caller":"/woodpecker/src/github.com/woodpecker-ci/woodpecker/server/api/hook.go:131","message":"failure to parse token from hook for test/test"}
...

After downgrading to 1.6.1 of the plugin it works. via:

WOODPECKER_DEFAULT_CLONE_IMAGE: woodpeckerci/plugin-git:v1.6.1

in my environment configuration for the server configuration.

@6543
Copy link
Member Author

6543 commented Dec 29, 2022

@khmarbaise that's an unrelated issue (#57), and yes that show that we need a nice error handling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants