Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jenkins git plugin showing errors when trying to access bitbucket

Baztheman July 8, 2019

How can i resolve the followings? It works on command line just fine.

 

Failed to connect to repository : Command "/usr/bin/git ls-remote -h http://bitbucket/scm/sym/atom.git HEAD" returned status code 128:
stdout: 
stderr: error: The requested URL returned error: 501  while accessing http://bitbucket/scm/sym/atom.git/info/refs

fatal: HTTP request failed

2 answers

2 accepted

0 votes
Answer accepted
Baztheman July 10, 2019

Upgrading the git version to 2.22.0 resolved the issue. I no longer seeing those warnings/erros in jenkins job configuration anymore.

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 10, 2019

Hello Barry,

Thank you for including the output from your issue you’re having. Your reported issue looks to be similar to an article which has the same error output. This article may be found at Git commands return error code 501.

Here is the cause and resolution within that article:

Cause

Git has 2 protocols when connecting over HTTP. Stash supports "smart HTTP", but will return a 501 for normal HTTP. This can mean one of two things:

  1. You are using an older version of Git which doesn't support "smart HTTP".
  2. There was a transient issue on the server, and your Git client tried normal HTTP as a fallback.

For more background on the Git "smart HTTP" protocol, see the  Pro-Git online book.

Resolution

In the first case, you'll need to upgrade your client-side version of Git. You need Git 1.6.6 or later on the client side.

In the second case, you can just try the command again. A possible cause of these transient issues may be that your server is hitting resource limits. See Scaling Stash for details.

If you’re still having issues after reviewing the above please let us know.

Regards,
Stephen Sifers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, bitbucket, ci/cd workflows, scale ci cd, bitbucket webinar, devops pipeline, continuous integration, continuous delivery, atlassian learning, software automation, developer tools, build and deploy, pipeline optimization, atlassian community

Scale CI/CD workflows faster with Bitbucket Pipelines 🪣

Join this webinar on June 25/26th to learn how to build secure CI/CD workflows using Bitbucket Pipelines and get tips from our own engineers on how to speed up builds and operate at scale.

Register today
AUG Leaders

Atlassian Community Events