lindell / multi-gitter

Update multiple repositories in with one command
Apache License 2.0
819 stars 64 forks source link

empty repository - could not fetch repositories: EOF #483

Open HawkSK opened 1 month ago

HawkSK commented 1 month ago

Describe the bug The run command fails if a git repo is empty. Exlcuding the repo does not work.

To Reproduce Steps to reproduce the behavior:

  1. Have a project ACME containing an empty git repo empty-repo
  2. Run multi-gitter run "/usr/bin/env bash ~/some_script.sh" --config=./config.yaml -B "feature/XY-123" -t "foo" -O ACME or also with flag -s ACME/empty-repo or also with flag --repo-exclude "empty-repo"
  3. See error could not fetch repositories: EOF

Expected behavior The run command should finish for all non-empty repositories in the organization. Empty repositories could be reported as a warning/error.

Additional context config.yaml

base-url: https://acme.com/
git-type: cmd
platform: bitbucket_server
ssh-auth: true

token: XY-...
username: hawk@acme.com

log-level: trace

output

time="2024-05-28T23:43:51+02:00" level=trace msg="http request" host=acme.com request="GET /rest/api/1.0/projects/ACME/repos/empty-repo/branches/default HTTP/1.1\r\nHost: acme.com\r\nUser-Agent: go-bitbucket/1.0.0/go\r\nAuthorization: Bearer <CENSORED>\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\n" response="HTTP/1.1 204 \r\nCache-Control: private, no-cache\r\nCache-Control: no-cache, no-transform\r\nContent-Type: application/json;charset=UTF-8\r\nDate: Tue, 28 May 2024 21:43:51 GMT\r\nPragma: no-cache\r\nSet-Cookie: BITBUCKETSESSIONID=s2~<CENSORED>; Max-Age=1209600; Expires=Tue, 11 Jun 2024 21:43:51 GMT; Path=/; Secure; HttpOnly\r\nVary: X-AUSERNAME\r\nVary: X-AUSERID\r\nVary: Cookie\r\nX-Arequestid: *1UKQTY0x<CENSORED>\r\nX-Asessionid: 1h<CENSORED>\r\nX-Auserid: 30<CENSORED>\r\nX-Ausername: hawk\r\nX-Content-Type-Options: nosniff\r\n\r\n" took=51.3166ms
could not fetch repositories: EOF
igstbagusdharmaputra commented 1 month ago

any updates?

lindell commented 1 month ago

@ryancurrah This seems to be a bitbucket-server specific problem. I'm not able to repro on other platforms. Are you able to take a look?