Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private CocoaPods – [!] Unable to add a source with url `` named `-1`

I just tried creating a private Pod by following this tutorial on TutsPlus. Everything works fine, until I try doing pod repo push REPO_NAME SPEC_NAME.podspec, where I get the following error:

Validating spec
Cloning spec repo `-1` from ``
[!] Unable to add a source with url `` named `-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

I used pod repo push MFPods ~/Desktop/MFReusable/BlinkingLabel/BlinkingLabel.podspec for trying to add it, but without luck.

Note: BlinkingLabel.podspec has passed validation, and MFPods has been added to ~/.cocoapods/repos. Only the pod's spec is missing...

Any idea as to why I'm getting this output? Thanks.

like image 982
Morten Faarkrog Avatar asked Jun 02 '16 20:06

Morten Faarkrog


2 Answers

I had this same problem and tried Tibrogargan's answer like this:

pod repo push --sources=https://my.private.repo/PodSpecs MYSpecs MyLib.podspec

then I got other error like:

Validating spec
 -> MyLib (0.1.0)
    - ERROR | [iOS] unknown: Encountered an unknown error (Unable to find a specification for `AFNetworking` depended upon by `MyLib/Base`) during validation.

and I tried this:

pod repo push --sources=https://my.private.repo/PodSpecs,https://github.com/CocoaPods/Specs MYSpecs MyLib.podspec

finally my problem solved.

like image 52
lincy Avatar answered Nov 08 '22 03:11

lincy


I just had the same problem. Through a lot of trial and error, I found out that my Xcode-developer path was not set correctly anymore.
After I fixed that using sudo xcode-select --switch path/to/the/Xcode/you/use, the crazy error did not occur anymore.

like image 45
Jan Nash Avatar answered Nov 08 '22 01:11

Jan Nash