问题
I went through this tutorial http://guides.cocoapods.org/making/private-cocoapods.html but coun't get any hint like how to create it. Its just shows what would be the structure only.
On the other side if i try to run pod install this came. Here i am trying to install sample-pod (Private pod) to one of my local project.
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.
For more details :- OS - Mac OSX 10.9 using latest version of cocoapods. git version 1.8.5.2 (Apple Git-48)
回答1:
You need to create your own Podspec repo which will contain your .podspec files.
Then use the following command to let CocoaPods know where your private repo is:
pod repo add <YourPivatePodsName> <YourPodRepoURL>
For Example:
pod repo add MyPrivatePods git@bitbucket.org:yourname/podspec.git
来源:https://stackoverflow.com/questions/25052755/how-to-add-a-private-spec-repo-for-using-private-pods