Answers: <p><strong>Enable TLS Certificate Verification:</strong>
  It's important to enable TLS certificate verification for secure connections. You can do this by configuring Git with the correct SSL certificates or CA certificates. Jenkins might not have the necessary certificates installed or configured.</p>
  <p><strong>Check Your Network Connection:</strong>
  The &quot;Connection was reset&quot; error could be related to network issues. Ensure that your Jenkins server has a stable and reliable network connection. If this is a recurring problem, consult your network administrator.</p>
  <p><strong>Update Git and Jenkins:</strong>
  Ensure that you are using an up-to-date version of Git on your Jenkins server.
  Make sure Jenkins and its plugins are also up-to-date. Sometimes, updating Jenkins and its plugins can resolve compatibility issues that might lead to Git errors.</p>
  <p><strong>Troubleshooting/Debugging:</strong>
  You can try to enable Git trace/debugging to get more detailed information about what's happening during the fetch operation.
  You can do this by setting the GIT_TRACE and GIT_CURL_VERBOSE environment variables to &quot;1&quot; or &quot;true.&quot;</p>
  
Answers: CC BY-SA 4.0
Answers: 2023-10-27T16:49:31.110Z
Answers: 2023-10-27T16:49:31.110Z
Answers: geeky_girl
Body: <p>We've migrated from a on premise GitBlit to Azure DevOps last week.</p>
  <p>Our builds are now suffering from periodic error while cloning the git repo. See example output. Main error is probaby <strong>returned status code 128</strong></p>
  <p>We are doing quiet a number of builds a day, and each build has multiple checkouts of different git repositories.</p>
  <p>Anybody has a clue?</p>
  <blockquote>
  <hr />
  <p>04:51:50  ERROR: Error cloning remote repo 'origin' 04:51:50
  hudson.plugins.git.GitException: Command
  &quot;C:\jenkins_opt\Git\bin\git.exe fetch --tags --force --progress
  --depth=1 -- https://company@dev.azure.com/company/GLIMS/_git/glims_glims-bin
  +refs/heads/<em>:refs/remotes/origin/</em>&quot; returned status code 128: 04:51:50  stdout:  04:51:50  stderr: warning: -----------------
  SECURITY WARNING ---------------- 04:51:50  warning: | TLS certificate
  verification has been disabled! |</p>
  <hr />
  <p>error: RPC failed; curl 56 Recv failure: Connection was reset 04:51:50
  fetch-pack: unexpected disconnect while reading sideband packet
  04:51:50  fatal: early EOF 04:51:50  fatal: fetch-pack: invalid
  index-pack output</p>
  <hr />
  </blockquote>
  
Tags: <azure-devops><git>
Title: Why is Azure Repos Git Checkout sometimes returning a Status code 128?
UserDisplayName: Lieven Cardoen
ThreadText: # Why is Azure Repos Git Checkout sometimes returning a Status code 128?
  
  (Asked by: username_0 on 2023-05-30)
  
  We've migrated from a on premise GitBlit to Azure DevOps last week.
  
  Our builds are now suffering from periodic error while cloning the git repo. See example output. Main error is probaby **returned status code 128**
  
  We are doing quiet a number of builds a day, and each build has multiple checkouts of different git repositories.
  
  Anybody has a clue?
  
  > ---
  >
  > 04:51:50 ERROR: Error cloning remote repo 'origin' 04:51:50
  > hudson.plugins.git.GitException: Command
  > "C:\jenkins\_opt\Git\bin\git.exe fetch --tags --force --progress
  > --depth=1 -- https://company@dev.azure.com/company/GLIMS/\_git/glims\_glims-bin
  > +refs/heads/*:refs/remotes/origin/*" returned status code 128: 04:51:50 stdout: 04:51:50 stderr: warning: -----------------
  > SECURITY WARNING ---------------- 04:51:50 warning: | TLS certificate
  > verification has been disabled! |
  >
  > ---
  >
  > error: RPC failed; curl 56 Recv failure: Connection was reset 04:51:50
  > fetch-pack: unexpected disconnect while reading sideband packet
  > 04:51:50 fatal: early EOF 04:51:50 fatal: fetch-pack: invalid
  > index-pack output
  >
  > ---
  
  **Tags:** azure-devops, git
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-10-27. Score: 0
  
  **Enable TLS Certificate Verification:**
  It's important to enable TLS certificate verification for secure connections. You can do this by configuring Git with the correct SSL certificates or CA certificates. Jenkins might not have the necessary certificates installed or configured.
  
  **Check Your Network Connection:**
  The "Connection was reset" error could be related to network issues. Ensure that your Jenkins server has a stable and reliable network connection. If this is a recurring problem, consult your network administrator.
  
  **Update Git and Jenkins:**
  Ensure that you are using an up-to-date version of Git on your Jenkins server.
  Make sure Jenkins and its plugins are also up-to-date. Sometimes, updating Jenkins and its plugins can resolve compatibility issues that might lead to Git errors.
  
  **Troubleshooting/Debugging:**
  You can try to enable Git trace/debugging to get more detailed information about what's happening during the fetch operation.
  You can do this by setting the GIT\_TRACE and GIT\_CURL\_VERBOSE environment variables to "1" or "true."
  
  
  ---
  
  