Heroku 作曲家安装:主机密钥验证失败



我正在尝试通过git push命令在Herkoku上部署我的PHP项目。这很好,直到作曲家无法安装存储在 Bitbucket 私有存储库中的私有包。返回的消息是:

remote: Compressing source files... done.
remote: Building source:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:        - php (7.0.6)
remote:        - ext-exif (bundled with php)
remote:        - ext-gd (bundled with php)
remote:        - ext-mbstring (bundled with php)
remote:        - apache (2.4.20)
remote:        - nginx (1.8.1)
remote: -----> Installing dependencies...
remote:        Composer version 1.1.1 2016-05-17 12:25:44
remote:        Loading composer repositories with package information
remote:        Installing dependencies from lock file
remote:          - Installing doctrine/lexer (dev-master 83893c5)
remote:            Downloading: 100%
remote:
remote:          - Installing doctrine/annotations (dev-master f25c8aa)
remote:            Downloading: 100%
remote:
remote:          - Installing doctrine/cache (dev-master e0ef9e9)
remote:            Downloading: 100%
remote:
remote:          - Installing doctrine/collections (dev-master 866e100)
remote:            Downloading: 100%
remote:
remote:          - Installing private-repo/private-repo (dev-master cff3e2d)
remote:            Cloning cff3e2d83977df680e724b8857f18ebea85af420
remote:
remote:          [RuntimeException]
remote:          Failed to execute git clone --no-checkout 'git@bitbucket.org:private-repo/private-repo.git' '/tmp/build_83b3c2f9665a4335124a98bf13b0d85b/vendor/private-repo/private-repo' && cd '/tmp/build_83b3c2f9665a4335124a98bf13b0d85b/vendor/private-repo/private-repo' && git remote add composer 'git@bitbucket.org:private-repo/private-repo.git' && git fetch composer
remote:          Cloning into '/tmp/build_83b3c2f9665a4335124a98bf13b0d85b/vendor/private-repo/private-repo'...
remote:          Host key verification failed.
remote:          fatal: Could not read from remote repository.
remote:          Please make sure you have the correct access rights
remote:          and the repository exists.
remote:
remote:        install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--op
timize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...
remote:
remote:
remote:  !     Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: !       Push rejected to xxx.

我已经将我通常使用Bitbucket进行身份验证的rsa密钥上传到我的Heroku帐户。

有人知道如何让 Heroku 使用我的 Bitbucket 存储库进行身份验证吗?

终于让它工作了。现在使用 http 基本身份验证将 Heroku 与 Bitbucket 连接起来。已按照以下步骤操作:

转换了存储库网址我的包.json(包含我的私有包)从: git@bitbucket.org:private-repo/private-repo.git自:

https://username@bitbucket.org/private-repo/private-repo.git

然后将以下配置添加到我的 composer.json 中:

"config": {
    "bitbucket-oauth": {
        "bitbucket.org": {
            "consumer-key": "Bitbucket username",
            "consumer-secret": "Bitbucket password"
        }
    }
}

不建议将您的密码存储在纯文本文件中,但不幸的是,Bitbucket 没有给我们选择

相关内容

  • 没有找到相关文章

最新更新