Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a private Spec Repo for using private pods?

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 `[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.

For more details :- OS - Mac OSX 10.9 using latest version of cocoapods. git version 1.8.5.2 (Apple Git-48)

like image 559
kidsid49 Avatar asked Jul 31 '14 07:07

kidsid49


People also ask

How do I create a Podspec file?

To create a Podspec, navigate to your project file in the Terminal. Run the following command to create the file: touch FantasticView. podspec . Now open the file using an editor.

How do I add pods dependencies?

From the CocoaPods repositorySpecify the name of a Pod library in the pod() function. In the configuration block, you can specify the version of the library using the version parameter. To use the latest version of the library, you can just omit this parameter altogether. You can add dependencies on subspecs.

Where can I find Podspec file?

Podspecs are ruby files. The Specs Repo is the repository on GitHub that contains the list of all available pods. Every library has an individual folder, which contains sub folders of the available versions of that pod. See the Private Pods section for an explanation of the Spec repo's file structure.


1 Answers

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 [email protected]:yourname/podspec.git
like image 149
Adam Avatar answered Sep 22 '22 03:09

Adam