克隆私人仓库时无法执行git clone --no-checkout

时间:2018-03-07 15:15:05

标签: php git composer-php bitbucket

我有一个Libraries项目,我通过这样的作曲家在我的主项目中拉动:

 "repositories": [
        {
          "type": "package",
          "package": {
            "name": "testsystems/libraries-project",
            "version": "master",
            "source": {
              "url": "git@bitbucket.org:testsystems/libraries-project.git",
              "type": "git",
              "reference": "master"
            },
            "autoload": {
              "psr-4": {
                "Test\\": "src/Test/"
              }
            }
          }
        }
      ],

然后要求:

"testsystems/libraries-project": "master"

问题是composer update在安装此项目时失败,并显示以下消息:

 Cloning into '/var/www/test/vendor/test/libraries'...
  repository access denied.
  fatal: Could not read from remote repository.
  Please make sure you have the correct access rights
  and the repository exists.

然后在~/.ssh/config我添加了:

Host bitbucket.org
HostName altssh.bitbucket.org
Port 443

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

回答我的问题:使用HTTPS而不是Git在我的情况下工作正常。

https://thitami@bitbucket.org/testrepo/libraries-project.git