【问题标题】:flutter passphrase in pubspecpubspec 中的颤振密码
【发布时间】:2018-06-12 09:00:53
【问题描述】:

是否可以在 pubspec.yaml 依赖项中使用 passphrase

dependencies:
  customFramework:
  url: git@gitlab.com:nameandurl..
  ref: lkjdfksdjf
  path: package/nameofpackage

我明白了

git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights

我正在使用passphrase,这是访问问题的原因。但是我想我需要添加密码 - 但是如何?

注意:passphrase 可能不应该在源代码中,但也许有办法。

【问题讨论】:

    标签: dart flutter


    【解决方案1】:

    您的 pubspec.yaml 语法错误。应该是

    dependencies:
      customFramework:
        git:
          url: git@gitlab.com:nameandurl..
          ref: lkjdfksdjf
          path: package/nameofpackage
    

    如果您使用git@... 路径(与https://... 相反)设置SSH 连接并在运行pub get 之前进行连接应该可以工作。

    https://help.github.com/articles/connecting-to-github-with-ssh/

    【讨论】:

      猜你喜欢
      • 2022-01-11
      • 2022-01-14
      • 1970-01-01
      • 1970-01-01
      • 2020-05-02
      • 2021-12-01
      • 2021-10-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多