与私有 git 存储库共享 Cartfile?

Shared Cartfile with private git repo?

我正在为使用 Carthage 管理依赖项的 Swift 项目做贡献。其中一些依赖项是私有存储库,即 Cartfile 包含如下条目:

git "https://username@bitbucket.org/path/project.git" "master"

为简单起见,我们希望能够 share/all 使用相同的 Cartfile,但我们 运行 遇到了麻烦,因为 link 到私有仓库需要用户名(并且然后 Carthage 挂起,因为它无法签出存储库)。

是否有一种(什么是)方式让我们都使用同一个 Cartfile?

它们是你们都可以访问的私有存储库吗?只需从存储库路径中删除用户名和密码,或使用 ssh URL (git@bitbucket.org:path/project.git).

http/https 需要身份验证的网址每次都会提示您输入凭据。您可以使用 git 的 credentials storage mechanism 来缓存您的响应或自动提供一个值。