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

16,992

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
Share:
16,992

Related videos on Youtube

kidsid49
Author by

kidsid49

Updated on September 16, 2022

Comments

  • kidsid49
    kidsid49 over 1 year

    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)

  • kidsid49
    kidsid49 almost 10 years
    How can i mirror this structure. ├── Specs └── [SPEC_NAME] └── [VERSION] └── [SPEC_NAME].podspec like i have to create manually these folders in github online.
  • Adam
    Adam almost 10 years
    @kidsid49 Clone the repo using SourceTree, add folders and files and push.
  • Walter Martin Vargas-Pena
    Walter Martin Vargas-Pena over 8 years
    Does anyone know the command to update your local private repo?
  • Adam
    Adam over 8 years
    @WalterMartinVargas-Pena is pod repo update what you are looking for?
  • Saty
    Saty about 8 years
    @Adam is that "MyPrivatePods" repo different from the one which we have created earlier and pushed our data to? if yes, then what things will be pushed to this private repo?
  • Adam
    Adam about 8 years
    @Saty this repo contains only the podspec files. You create a folder for each pod and within that folder you create subfolder for each version. These subfolders contain the podspec files. See the public repo for an example.