首页 > 解决方案 > 如何在 Jenkins 中签出 Bitbucket Git-LFS 存储库?

问题描述

我在我们的 Bitbucket 服务器上有一个 Git LFS 设置,并且可以在我的 Mac 上克隆它,因为我是所有者。

现在我正在尝试进行设置,以便 Jenkins 作业可以克隆存储库,等等我的 SCM 部分

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

它可以很好地访问 repo,但是当它尝试签出 Git-LFS 文件时,会收到以下访问错误。请参阅最后一行的Permission denied (publickey)错误。

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

如何设置“特定于 Git-LFS”的级别身份验证?

我现在不想使用 Jenkinsfile。

标签: jenkinsjenkins-pluginsbitbucket-servergit-lfs

解决方案


尝试在您的工作的 SCM 配置的 Git 部分中添加“其他行为”->“Git LFS pull after checkout”。


推荐阅读