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

multi-gitter close: unable to delete branch with bitbucket_server #482

Open
HawkSK opened this issue May 28, 2024 · 1 comment
Open

multi-gitter close: unable to delete branch with bitbucket_server #482

HawkSK opened this issue May 28, 2024 · 1 comment
Labels
Bitbucket server bug Something isn't working help wanted Extra attention is needed

Comments

@HawkSK
Copy link

HawkSK commented May 28, 2024

Describe the bug
I successfully created a PR with multi-gitter, but when I wanted to close it, the branch was not deleted. PR was deleted successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Have a PR from branch feature/XY-123 in repo testrepo in project ACME
  2. Run multi-gitter close --config=./config.yaml -B "feature/XY-123" -R ACME/testrepo
  3. See error

Expected behavior
The branch is deleted after the PR is closed/deleted.

Additional context
config.yaml

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

token: XY-...
username: [email protected]

log-level: trace

Output:

...
time="2024-05-28T22:54:00+02:00" level=info msg="Closing 1 pull requests"
time="2024-05-28T22:54:00+02:00" level=info msg=Closing pr="ACME/testrepo#24"
time="2024-05-28T22:54:00+02:00" level=trace msg="http request" host=acme.com request="DELETE /rest/api/1.0/projects/ACME/repos/testrepo/pull-requests/24 HTTP/1.1\r\nHost: acme.com\r\nUser-Agent: go-bitbucket/1.0.0/go\r\nContent-Length: 14\r\nAuthorization: Bearer <CENSORED>\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\n{\"version\":0}\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 20:54:00 GMT\r\nPragma: no-cache\r\nSet-Cookie: BITBUCKETSESSIONID=s1~CENSORED; Max-Age=1209600; Expires=Tue, 11 Jun 2024 20:54:00 GMT; Path=/; Secure; HttpOnly\r\nVary: X-AUSERNAME\r\nVary: X-AUSERID\r\nVary: Cookie\r\nX-Arequestid: *XBOIK3x<CENSORED>\r\nX-Asessionid: a71cv7\r\nX-Auserid: 123\r\nX-Ausername: HAWK\r\nX-Content-Type-Options: nosniff\r\n\r\n" took=154.1911ms
time="2024-05-28T22:54:00+02:00" level=trace msg="http request" host=acme.com request="DELETE /rest/branch-utils/1.0/projects/ACME/repos/testrepo/branches HTTP/1.1\r\nHost: acme.com\r\nUser-Agent: Go-http-client/1.1\r\nContent-Length: 81\r\nAuthorization: Basic <CENSORED>\nContent-Type: application/json\r\nAccept-Encoding: gzip\r\n\r\n{\"name\":\"refs/heads/feature/XY-123\",\"dryRun\":false}" response="HTTP/1.1 401 \r\nTransfer-Encoding: chunked\r\nCache-Control: private\r\nContent-Type: application/json;charset=UTF-8\r\nDate: Tue, 28 May 2024 20:54:00 GMT\r\nVary: accept-encoding\r\nWww-Authenticate: Basic realm=\"Atlassian Bitbucket\"\r\nX-Arequestid: *1UKQTY0x<CENSORED>\r\n\r\nc5\r\n{\"errors\":[{\"context\":null,\"message\":\"Authentication failed. Please check your credentials and try again.\",\"exceptionName\":\"com.atlassian.bitbucket.auth.IncorrectPasswordAuthenticationException\"}]}\r\n0\r\n\r\n" took=89.2231ms
Error: unable to delete branch: status code 401: {"errors":[{"context":null,"message":"Authentication failed. Please check your credentials and try again.","exceptionName":"com.atlassian.bitbucket.auth.IncorrectPasswordAuthenticationException"}]}
Usage:
...
@HawkSK HawkSK added the bug Something isn't working label May 28, 2024
@lindell
Copy link
Owner

lindell commented Jun 2, 2024

@ryancurrah Are you able to take a look at this? I have no access bbs to debug this.

@lindell lindell added the help wanted Extra attention is needed label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bitbucket server bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants