PR mode builds failing - auth error 128, but CI mode builds are ok

The error is on the git-clone step; doesn’t seem to matter which version

remote: Invalid username or password.
fatal: Authentication failed for ...
exit status 128

Failing builds are always PR merge builds

version: 1.11.0
INFO[14:12:41] bitrise runs in PR mode           
INFO[14:12:41] bitrise runs in CI mode           
INFO[14:12:41] Running workflow: primary         
Switching to workflow: primary

The thing I don’t understand is why the push builds from the same repo don’t fail for the same reason. They all seem to be fine.

version: 1.10.1
INFO[21:09:15] bitrise runs in CI mode           
INFO[21:09:15] Running workflow: primary         
Switching to workflow: primary

I also wasn’t sure why the CI mode builds would be version 1.10 and PR mode builds are 1.11

Can you point me in the right direction to debug this?

Thanks!

Hi @fmedlin,

Can you please copy paste both build’s bitrise.io URL? We’ll look into it ASAP! :slight_smile:

@viktorbenei Awesome, thanks!

CI build that passes

PR build that fails

Is this a self hosted GitHub repository?

Yes, it is

So, I’m learning things :blush:

When a PR is submitted, it’s check state on the PR depends on the last completed build. In this case, if the merge build finishes last and fails, the check state is fail.

However, if the merge build fails first and the CI build passes, the check state is pass.

I think our TOU allows 4 builds at a time.

Not sure if this is relevant or not. :slight_smile:

Can you please upgrade the Git Clone step to the latest version (4.0.4) and change the Manual merge option (in the Clone Config category) from “yes” to “no”?

We changed how PR merge happens in the v4 version of the step, to a more direct (depends less on GitHub, does the whole PR pre-merge logic via git) approach, but it seems we forgot about self hosted GitHub, which sends the PR repo a bit differently (in your case it sends it as a https:// git clone url, not with git@ (ssh) git clone URL).

From the log (secure details redacted):

...
- RepositoryURL: git@git.REDAC.TED:REDAC/TED.git
...
- PRRepositoryCloneURL: https://git.REDAC.TED/REDAC/TED.git
...

We’ll fix this ASAP (the git clone step should be able to determine that these two URLs point to the same repo), in the meantime changing the Manual Merge option from the new default (yes) to no should restore the PR pre-merge strategy of previous versions of the step.

If you’d have any questions just let us know! :slight_smile:

Thanks @viktorbenei, that seems to have fixed it.

1 Like

Thanks for confirming @fmedlin!

We’ll try to push out an update ASAP!
Sorry for the inconvenience and thanks for reporting the issue! :slight_smile:

@fmedlin fixes was released in the latest version of the Git Clone step (4.0.5): Git Clone Repository v4.0.5

Let us know if you’d have any issues with the latest version!

Thanks for reporting the issue and sorry for the inconvenience.
Happy Building! :slight_smile:

1 Like