woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.32k stars 373 forks source link

Manual clone step does not work #1928

Closed windsource closed 1 year ago

windsource commented 1 year ago

Component

server, agent

Describe the bug

With previous next versions of Woodpecker the manual clone step worked fine but with next-44b54db475 it does not work anymore.

.woodpecker.yml:

clone:
  git:
    image: woodpeckerci/plugin-git
    settings: 
      depth: 50

steps:
  build-main:
    image: ubuntu
    commands: 
      - echo Build main
      - cat README.md

results in failure in the git step:

+ git init -b main
Initialized empty Git repository in /woodpecker/src/github.com/<removed>
+ git remote add origin https://github.com/<removed>
+ git fetch --no-tags --depth=1 --filter=tree:0 origin +refs/heads/main:
fatal: could not read Username for 'https://github.com': No such device or address
exit status 128

A .woodpecker.yml without a manual clone step works fine:

steps:
  build-main:
    image: ubuntu
    commands: 
      - echo Build main
      - cat README.md

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-44b54db4"}

Additional context

No response

Validations

zc-devs commented 1 year ago

1837

windsource commented 1 year ago

Ok I see. When I switch off "Only inject netrc credentials into trusted containers" then the manual clone step works.

6543 commented 1 year ago

jep a dublicate of #1837 ...