Composer 在 IIS 上安装 private repository by Jenkins CI



我正在尝试通过在我的IIS服务器上的composer.json中composer install以下行(由Jenkins CI触发(从私有bitbucket存储库安装作曲家依赖项。

"repositories": [
    {
        "type": "vcs",
        "url": "ssh://git@bitbucket.org/company/repo-name.git"
    }
],

结果是:

Failed to execute git clone --mirror "ssh://git@bitbucket.org/company/web.git" "C:/Users/myusername/AppData/Local/Composer/vcs/ssh---company-bitbucket.org-repo-name.git/"
Cloning into bare repository 'C:/Users/myusername/AppData/Local/Composer/vcs/ssh---company-bitbucket.org-repo-name.git'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

是否可以在不需要ssh-agent的情况下将private.ppk与作曲家链接起来?

Jenkins CI 以 sysuser 身份登录,因此导航到其 .ssh 文件夹并编辑配置文件:C:\Windows\System32\config\systemprofile.ssh\config(如果"config"文件不存在,请创建它(

将您的密钥存储到例如密钥子文件夹:C:\Windows\System32\config\systemprofile.ssh\keys\bitbucket

在配置文件中添加以下行:

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/keys/bitbucket

相关内容

  • 没有找到相关文章

最新更新