【问题标题】:How to add a private Spec Repo for using private pods?如何添加私有 Spec Repo 以使用私有 Pod?
【发布时间】:2014-07-31 07:08:55
【问题描述】:

我浏览了本教程http://guides.cocoapods.org/making/private-cocoapods.html,但没有得到任何关于如何创建它的提示。 它只显示了结构。

另一方面,如果我尝试运行 pod install,就会出现这种情况。 在这里,我正在尝试将 sample-pod (Private pod) 安装到我的本地项目之一。

siddarths-MacBook-P:PodInstallDemoApp siddarthchaturvedi$ pod install
Analyzing dependencies
Pre-downloading: `sample-pod` from `git@github.com:MY_COMAPNY_NAME/sample-pod.git`
Enter passphrase for key '/Users/siddarthchaturvedi/.ssh/id_rsa': 
Enter passphrase for key '/Users/siddarthchaturvedi/.ssh/id_rsa': 
[!] /usr/bin/git clone git@github.com:MY_COMPANY_NAME/sample-pod.git   /Users/siddarthchaturvedi/Library/Caches/CocoaPods/GitHub/8ce0f86807ab15b9f8d51bb9d2026cc102ba51aa --mirror

Cloning into bare repository    '/Users/siddarthchaturvedi/Library/Caches/CocoaPods/GitHub/8ce0f86807ab15b9f8d51bb9d2026cc102ba51aa'...

Saving password to keychain failed

Permission denied (publickey).

fatal: Could not read from remote repository.



 Please make sure you have the correct access rights

 and the repository exists.

更多详情:- OS - Mac OSX 10.9 使用最新版本的 cocoapods。 git 版本 1.8.5.2 (Apple Git-48)

【问题讨论】:

标签: ios cocoa-touch cocoapods


【解决方案1】:

您需要创建自己的 Podspec 存储库,其中将包含您的 .podspec 文件。

然后使用以下命令让 CocoaPods 知道你的私有仓库在哪里:

pod repo add <YourPivatePodsName> <YourPodRepoURL>

例如:

pod repo add MyPrivatePods git@bitbucket.org:yourname/podspec.git

【讨论】:

  • 我怎样才能镜像这个结构。 ├── Specs └── [SPEC_NAME] └── [VERSION] └── [SPEC_NAME].podspec 我必须在github在线手动创建这些文件夹。
  • @kidsid49 使用 SourceTree 克隆 repo,添加文件夹和文件并推送。
  • 有人知道更新本地私有仓库的命令吗?
  • @WalterMartinVargas-Pena 是 pod repo update 你在找什么?
  • @Adam 是不是“MyPrivatePods”存储库与我们之前创建并将数据推送到的存储库不同?如果是,那么会将哪些内容推送到这个私有仓库?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-06-05
  • 1970-01-01
  • 1970-01-01
  • 2015-01-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多