Closed sb-child closed 1 year ago
that sould strange :/
you can use as a workaround a custom clone step and use settings and secrets to auth to your gitea ... ... but I guess it might have to do something with how git does handle auth +netrc+non-default-port ?
Same issue after upgrading docker images (next tag). CI can't clone private repositories.
woodpecker-agent_1 | {"level":"debug","repo":"murph/murph-doc","pipeline":"27","id":"615","image":"docker.io/woodpeckerci/plugin-git:2.0","stage":"clone","time":"2022-12-25T22:05:34Z","caller":"/src/agent/logger.go:53","message":"log stream opened"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: + git init -b master\n"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: Initialized empty Git repository in /woodpecker/src/gitnet.fr/murph/murph-doc/.git/\n"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: + git remote add origin https://gitnet.fr/murph/murph-doc.git\n"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: + git fetch --no-tags --depth=1 --filter=tree:0 origin +refs/heads/master:\n"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: fatal: could not read Username for 'https://gitnet.fr': No such device or address\n"}
woodpecker-agent_1 | {"level":"trace","name":"clone","ID":"615","time":"2022-12-25T22:05:34Z","caller":"/src/pipeline/rpc/line.go:69","message":"grpc write line: exit status 128\n"}
Not reproduced with woodpeckerci/plugin-git:v1.6.1
Same problem on upgrading. Found a way to make it work with lastest plugin-git Need to set home to /root, default is /app
clone:
git:
image: woodpeckerci/plugin-git
settings:
home: /root
ahh maybe the folder / file permissions of /app are to open?
The problem is .netrc location, it's written in /root instead of /app.
https://github.com/woodpecker-ci/plugin-git/blob/3b7301e692d8fc8c85328d6c213e0fc2abeb2b8a/utils.go#L70
home := os.Getenv("PLUGIN_HOME")
fix it but will not work with home config override.
-> #1505
Component
agent, other
Describe the bug
After resolving https://github.com/woodpecker-ci/woodpecker/issues/1471 by updating
git-plugin
to the newest version, the new problem comes:clone
pipeline logs:I had tried https://woodpecker-ci.org/faq#how-to-debug-clone-issues, but I can clone the repo by enter username and password in container without any problem.
I have run this pipeline file, then tried to copy
/root/.netrc
out when theclone
pipeline was running:Note that the first line is blank
I have no idea about how to debug that. Should I provide more information? Please let me know, thanks!
System Info
Additional context
Woodpecker
docker-compose.yml
:Logs:
Validations