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

kid*_*d49 5 cocoa-touch ios cocoapods

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

另一方面,如果我尝试运行pod安装,这来了.在这里,我尝试将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.
Run Code Online (Sandbox Code Playgroud)

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

Ada*_*dam 8

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

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

pod repo add <YourPivatePodsName> <YourPodRepoURL>
Run Code Online (Sandbox Code Playgroud)

例如:

pod repo add MyPrivatePods git@bitbucket.org:yourname/podspec.git
Run Code Online (Sandbox Code Playgroud)