【问题标题】:Problem to access the private library that I need, using heroku deploy使用 heroku deploy 访问我需要的私有库的问题
【发布时间】:2022-04-05 02:30:26
【问题描述】:

目前我正在尝试在 heroku 上部署一个颤振 Web 项目,该项目使用 azure devops 上的私有库。我使用 PC 上的 SSH 密钥访问这个私有库。问题是当我尝试从 dyno 访问库时,之前没有注册任何 ssh 密钥。

我想知道的是:如何从我正在部署的项目中访问我的私有库?

Running "flutter pub get" in build_7d8ec7f9...                  
Git error. Command: `git clone --mirror ssh://git@ssh.dev.azure.com/v3/example/project/sdk /app/.pub-cache/git/cache/sdk-b3499e8736208204591e9ce10402ffa3d77b19aa`
stdout: 
stderr: Cloning into bare repository '/app/.pub-cache/git/cache/sdk-b3499e8736208204591e9ce10402ffa3d77b19aa'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
exit code: 128
       pub get failed (server unavailable) -- attempting retry 1 in 1 second...

【问题讨论】:

  • 这能回答你的问题吗? How to link Heroku app to private Github Repo?
  • @doesnotmatter,我不这么认为。 OP 有一个私有的依赖。这个问题是关于一个私人项目
  • 就是这样@Chris。我的项目有一个私有依赖项,需要 SSH 密钥才能访问,我真的不知道如何在 heroku 上做到这一点
  • 不确定。在 GitLab 上,我建议您部署令牌,但 Azure DevOps 似乎不支持它们。你可以尝试在 Azure Artifacts 上发布一个包,但它看起来不支持 Dart(大概这就是你正在使用的基于 flutter pub get 的东西?)有 Gemfury,但它似乎同样不支持 Dart .
  • 好像我落后于八球,但我会尝试期待蔚蓝神器

标签: flutter heroku ssh


【解决方案1】:

问题已解决,放弃 SSH。现在我正在使用生成的个人令牌并像这样在 pubpec 中使用:

ur_private_library:
    git:
      url: https://<token-name>:<token-password>@dev.azure.com/<your-repo-url>

查看link 了解如何创建个人令牌访问权限

【讨论】:

    猜你喜欢
    • 2019-05-17
    • 2020-12-20
    • 2013-03-23
    • 1970-01-01
    • 2013-04-27
    • 1970-01-01
    • 1970-01-01
    • 2018-02-13
    • 1970-01-01
    相关资源
    最近更新 更多