如何添加私有Spec Repo以使用私有pod?

时间:2014-07-31 07:08:55

标签: ios cocoa-touch cocoapods

我浏览了这个教程http://guides.cocoapods.org/making/private-cocoapods.html,但是不知道如何创建它。 它只显示了结构的唯一性。

另一方面,如果我尝试运行pod install,那就来了。 在这里,我尝试将sample-pod(私有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.

有关详细信息: - 操作系统 - Mac OSX 10.9使用最新版本的cocoapods。                     git版本1.8.5.2(Apple Git-48)

1 个答案:

答案 0 :(得分:8)

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

然后使用以下命令让CocoaPods知道您的私人仓库的位置:

pod repo add <YourPivatePodsName> <YourPodRepoURL>

例如:

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