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

问题描述 投票:5回答:1

我经历了这个教程qazxsw poi但是没有得到任何关于如何创建它的提示。它只是展示了结构的唯一性。

另一方面,如果我尝试运行pod安装,这来了。在这里,我尝试将sample-pod(私有pod)安装到我的本地项目之一。

http://guides.cocoapods.org/making/private-cocoapods.html

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

ios cocoa-touch cocoapods
1个回答
8
投票

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

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

siddarths-MacBook-P:PodInstallDemoApp siddarthchaturvedi$ pod install
Analyzing dependencies
Pre-downloading: `sample-pod` from `[email protected]: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 [email protected]: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.

例如:

pod repo add <YourPivatePodsName> <YourPodRepoURL>
© www.soinside.com 2019 - 2024. All rights reserved.