woodpecker-ci / woodpecker

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

Cloning repo fails with "fatal: no path specified" / exit 128 #2111

Closed dr460nf1r3 closed 11 months ago

dr460nf1r3 commented 12 months ago

Component

server, agent

Describe the bug

Web UI logs:

+ git config --global http.sslVerify false
+ git init -b main
Initialized empty Git repository in /woodpecker/src/19[2](http://192.168.22.78:8000/repos/2/pipeline/472#L2).1[6](http://192.168.22.78:8000/repos/2/pipeline/472#L6)8.22.[7](http://192.168.22.78:8000/repos/2/pipeline/472#L7)8/org/repo/.git/
+ git remote add origin 
+ git fetch --no-tags --depth=1 --filter=tree:0 origin +refs/heads/main:
fatal: no path specified; see 'git help pull' for valid url syntax
exit status 128

Server logs:

{"level":"error","repo_id":"2","pipeline_id":"538","workflow_id":"2215","error":"stream: not found","time":"2023-08-04T07:10:32Z","message":"done: cannot close log stream for step 2693"}

Agent logs:

{"level":"warn","repo":"org/repo","pipeline":"472","id":"2215","error":"rpc error: code = Unknown desc = Step finished with exit code 128, ","time":"2023-08-04T07:10:32Z","message":"cancel signal received"}

First seen here: https://github.com/woodpecker-ci/woodpecker/issues/1169

It worked before updating to the latest next version yesterday. Reverting to the tag next-0cf602a1f6-alpine fixes the issue, so it must've been introduced in the latest commits.

System Info

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

Additional context

Using the official next-alpine Docker containers.

Validations

danog commented 11 months ago

+, same here

SeriousBug commented 11 months ago

Same for me. The earliest tag I could find that works was next-6d373daea0, although I did skip over some tags so there could be an earlier point that is functional.

pat-s commented 11 months ago

Can you double check that you're using plugin-git:2.1.0? I got the same error when still using 2.0.3.

https://github.com/woodpecker-ci/plugin-git/releases

dr460nf1r3 commented 11 months ago

The configuration I was using at this time is:

clone:
  git:
    image: woodpeckerci/plugin-git
    settings:
      # We are skipping verification of certificates because a
      # selfsigned one is used for Forgejo
      skip_verify: true

So it should be always the latest image available?

pat-s commented 11 months ago

You don't even need the clone: part explicitly as this is inferred in the background automatically (just fyi in case this is not clear).

But other than that, it should use 2.1.0 automatically, yes. But it might be that you had fixed the image in your server config to some other version, that's why I asked.

I can't replicate the issue anymore with 2.1.0.

danog commented 11 months ago

Yep I actually had 1.5.0 hardcoded in my config to fix some other issue, switching to the latest tag fixed it for me.

SeriousBug commented 11 months ago

I put in the latest tag and pulled, and it all seems to work fine now! Either it's fixed, or it was operator error to begin with 😅

pat-s commented 11 months ago

As everything is working with the latest release, let's close here 🙂

patrickuhlmann commented 7 months ago

I upgraded to docker v2.0.0 today and am encountering the same issue:

clone:
  git:
    image: woodpeckerci/plugin-git:latest
    environment:
      - PLUGIN_LFS=false
      - PLUGIN_CUSTOM_SSL_PATH=/LAN.crt
    volumes:
      - /volume1/LAN.crt:/opt/LAN.crt

Actually I realized that the image was still outdated. Sorry.

qwerty287 commented 7 months ago

@patrickuhlmann Can you check the logs? Do you have the same as in the issue description?

patrickuhlmann commented 7 months ago

Yes it was the same. But also with an outdated image.

qwerty287 commented 7 months ago

So it's working now?

patrickuhlmann commented 7 months ago

Yes