Issue
We use a Gerrit-triggered Jenkins pipeline to build an HTML app and everything works fine except the Azure deployment stage, which fails from time to time. At the beginning of the project, it would fail once in a while, but recently (as the project grows I suspect), it reached the point where only 1 deployment out of 10 would succeed.
The pipeline runs on one of 3 Linux VM and could succeed or fail on any of them.
The issue is always the same:
hudson.plugins.git.GitException: Command "git fetch --tags --progress https://.../sgo-html5-app-desktop.git +refs/heads/:refs/remotes/origin/" returned status code 128
I googled this issue and found out that this error code is about authentication. But how could it sometimes work and sometimes not?
EDIT: Not sure if it's related but after 5 failed deployments, we restarted Jenkins and the ensuing deploy succeeded.
Solution
Not really an answer but we changed our workflow (no more Gerrit and Jenkins), hence making the whole issue disappear.
Answered By - Rodolphe
Answer Checked By - Robin (JavaFixing Admin)