Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to checkout Bitbucket Git-LFS repo via Jenkins? Edited

Sorry if this is a Jenkins question. However, I figured I'm NOT the first one to do this so I'll ask here too.

I have a Git LFS setup on our Bitbucket server, and can clone it on my Mac since I'm the owner.

Now I'm trying to set this up so a Jenkins job can clone the repo, and so on the SCM section I have

Repository URL: git@server.company.com:user/path/repo.git
Credentials: uernamePwCreds

It can get to the repo fine, but when it tries to checkout a Git-LFS file, it gets the following access error. See the Permission denied (publickey) error on last line.

FATAL: Could not checkout 104e35fb26dc1d3ed1689523cccb6e97829c0feb
hudson.plugins.git.GitException: Command "git checkout -f 104e35fb26dc1d3ed1689523cccb6e97829c0feb" returned status code 128:
stdout: 
stderr: Downloading MarcomLite/lib/jets3t-0.6.1/cockpit-0.6.1.jar (144 KB)
Error downloading object: MarcomLite/lib/jets3t-0.6.1/cockpit-0.6.1.jar (716be41): Smudge error: Error downloading MarcomLite/lib/jets3t-0.6.1/cockpit-0.6.1.jar (716be4107b362e413dc1ae29dc88e9b79e680def2c725ecc2d73268c4ea66e75): batch request: Permission denied (publickey).: exit status 255

How do I setup the "Git-LFS-specific" level authentication? I don't want to use a Jenkinsfile for now, but will probably do that later.

1 answer

0 votes
Mikael Sandberg Community Leader Jun 22, 2018

What do you get in return when running ssh git@server.company.com git-lfs-authenticate "repository" download

Jenkins error code 128 indicate that it is using the wrong ssh key when trying to connect to Bitbucket.

Thanks. I created a Jenkins pipeline instead, and it did the trick. That's what we are using anyway.

I have the same issue with a regular Jenkins job, but changing to a pipeline didn't help. Manually running ssh git@server.company.com git-lfs-authenticate "myrepo" download also failed with the same Permission denied (publickey) error.

We have an older Bitbucket Server (v4.3.2), what were you using, Chris? Perhaps I just need a server upgrade.

Can we get an update on this request.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,926 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you