Leonardo Wildt
Leonardo Wildt

Reputation: 2599

VSTS Git Fetch Failed with exit code: 128

It looks like a duplicate of this question but my issue is that I am running a hosted version. VSTS GIT Fetch Failed

I enabled system debug and pretty much allowed all roles all access since its only me at the moment. I had created a new project recently and that is the only thing that has changed for me in VSTS. I am running on a hosted agent and tried creating a new build pipeline. Has anyone faced this recently?

enter image description here

Upvotes: 22

Views: 88750

Answers (11)

Guillaume Blanchet
Guillaume Blanchet

Reputation: 659

In our case, we just restart the Windows server hosting the service agents and it resolves this issue.

Since we use service account authenticated with our Active Directory, we think the cause was due to the premature restart of the build server before the Active Directory one during an outage we had few days before.

Upvotes: 0

WinkieWinkie
WinkieWinkie

Reputation: 15

In my case was facing the ##[error]Bash exited with code '128'. - in my case i had to generate new Git credentials and set them as new values in the variables settings section.

A brief on my implementation is that we use Azure Devops - Pipeline that is connected to a AWS Code Commit, see the walk through here, Guide

Upvotes: 0

Suchith
Suchith

Reputation: 1527

From Visual studio while pushing to the branch observed this issue: 'Git failed with a fatal error. ExitCode : 128'

For me worked the below steps:

  • Create a local folder and change command line to that folder and run :

Git clone branchUrl

  • Enter User name and password(in case of aure devops, Below clone repository option select generate credentials options enter the username and password token).
  • After successful clone. close and re open visual studio open the same project where you are facing the authentication issue, now it should work.

Upvotes: 0

GetShifting
GetShifting

Reputation: 742

This week I ran into another cause of this issue. In my case the yaml pipeline was trying to access two repositories, one in it's own project which went fine, another in a different project (but within the same organization) which failed. It turned out we needed to change some project settings. To do so, go to the project settings (gear icon) -> Pipelines -> Settings and disable these settings:

  • Limit job authorization scope to current project for non-release pipelines
  • Limit job authorization scope to current project for release pipelines

After that the error was gone and the checkout of the repo from another project was successful.

Upvotes: 0

OSH
OSH

Reputation: 2937

I've had a similar issue that was caused by the "Pipeline permissions" section in the security tab. after adding the relevant pipeline to the allowed list, everything began working: Pipeline permissions

Upvotes: 1

Ivneet Singh
Ivneet Singh

Reputation: 462

App Center: The problem is that your build configuration not getting saved/considered when you are triggering the build. The solution to this is just go to the configure page and click on the save(again). There you go and trigger the build.

Upvotes: 4

Jan Mucha
Jan Mucha

Reputation: 100

In my case, I'm traing check out branche from different project, other than where I was creating the pipeline and there were no permissions.

Upvotes: 0

Ankit Kotnala
Ankit Kotnala

Reputation: 83

I recently came across this issue and after several tries what worked for me is a check box for "Checkout Files from LFS" while adding the artifacts to Azure release/pipeline. Here

enter image description here

Upvotes: 1

Pampy
Pampy

Reputation: 979

For anyone who finds this question, while searching for the 128 exit code:

In my case it was Bitbucket Server running out of space (full hard drive) which caused this error. If you're hosting your git server yourself, check your hard drive:

df

Maybe that helps someone.

Upvotes: 2

mivra
mivra

Reputation: 1400

Another possible cause of the "Git fetch failed with exit code: 128" error message - it happened to us for pull requests builds when a developer clicked merge right after a pull request was created and the build, of course, hasn't finished yet.

So it was the "follow the process" solution for us. It could be enforced also.

Upvotes: 10

Leonardo Wildt
Leonardo Wildt

Reputation: 2599

In my case the error was caused by a change in permission settings in Version Control. I went to the gear icon --> project settings --> Version Control. I selected Git repositories on the left and under users i made sure to include 'Project Collection Build Service(project)'

enter image description here

Upvotes: 9

Related Questions