Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

##[error]Git fetch failed with exit code: 128

Tags:

tfs

devops

We have a Git repo on TFS and I am trying to create a pipeline using azure pipelines to connect to the TFS repos.

I get the following error:

fatal: unable to access 'http://tfs.****************': Could not resolve host: tfs.******

##[error]Git fetch failed with exit code: 128

like image 648
Legend Gene Avatar asked Apr 18 '26 17:04

Legend Gene


1 Answers

I would suggest you first use "git clone" command line to clone remote repo.

Kindly check when you run it manually from the build agent, it work for that repo or not.

This will narrow down if the issue related to your environment or pipeline.

  • If you are able to use git command to connect and clone that repo. This means there is something wrong with your build service account. You should make sure build service account has access to that repo. You could also directly change the service account to the one you used to run git command.
  • If you are not able to do it. Then this may related to network environment. Make sure your build agent are able to access TFS on-premise server. Temporarily turn off firewall and any proxy. Also try to directly use browser to login TFS web portal.
like image 135
PatrickLu-MSFT Avatar answered Apr 21 '26 19:04

PatrickLu-MSFT