Legend Gene
Legend Gene

Reputation: 31

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

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

Upvotes: 3

Views: 7450

Answers (2)

P Motameni
P Motameni

Reputation: 31

It seems that it is a self-deployment of TFS server then you need to make sure that the Server can be reached from Azure DevOps.
Based on URL in your post, I assume server is not reachable from public internet. So TFS server should be either on-prem or on a VM in Azure. So reach out to your infrastructure team to see where the server is, and how the connection could be established from build agent being used by Azure DevOps to the TFS server.

Upvotes: 0

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51143

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.

Upvotes: 2

Related Questions