Pod push fails to push to master repo - cocoapods

I am trying to release a podspec on Cocoapods. According to the documentation, I should be able to use pod spec create [NAME] followed by rake release to release the podspec. Everything seems to go fine until rake release tries to push to the Specs repo.
Adding the spec to the `master' repo
$ /opt/local/bin/git status --porcelain 2>&1
- [No change] IPQuickModal (0.1.2)
Pushing the `master' repo
Username for 'https://github.com': brightredchilli
Password for 'https://brightredchilli#github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'
It looks like it is trying to push to the main Cocoapods Spec repo, which will make sense as to why it fails. Am I missing something? It looks like the tool is easy to use, but I need push access to the spec repo. However, this is not clear on the doc page.

To submit a podspec to CocoaPods (currently) you must submit a pull request to the specs repo. Currently no one but the core team has push access.

Related

Github Pages Ignoring Updates to Dependency of Jekyll App

I have a jekyll app that uses the jekyll-seo-tag. I forked jekyll-seo-tag to make some more tweaks. I pushed my changes up to Github and pointed my Gemfile to the forked repo.
When I run the app locally, I see the correct (i.e. new) behavior. When I push the jekyll app to Github, I see don't the updates.
I've inspected the Gemfile.lock file on Github and it's pointed to my forked repo and is using the correct SHA.
I tried to get Github to rebuild the page by sending an empty commit.
git commit -m 'rebuild site' --allow-empty
But it had no effect.
My guess is that when GitHub builds the app, it's using a cached version, but that's just a theory. I get no errors anywhere.
Any idea what else I can do to troubleshoot this?

Is there a way I can specify a different repository for the CocoaPods master repo?

At my work, we have a private cocoapods repository that we use to host whitelisted libraries for developers, and I am trying to validate a library I wrote.
Whenever i do a pod spec lint MYPODNAME --verbose, CocoaPods tries to validate my spec against the master repo instead of my private repo.
Is there any way to get around this behavior?
I have tried completely removing the master repo, but it still attempts to validate my pod's dependencies against master
EDIT: This issue seems to describe what I am experiencing.
Answering my own question. You have to manually specify the --sources for what CocoaPods will validate the spec against.
pod spec lint MYPODNAME --verbose --sources=git#<DOMAIN>:<REPO>.git

Use private podspec repo only with Cocoapods

I host a private podspec repo internally, and I would like to use Cocoapods without depending on the public master spec repo. Is there a way to remove dependency on the master spec repo entirely?
The issue is that my company is frozen at cocoapods 0.34.1, and cannot update in time. However, recent changes to the master repo require a min version of 0.35.0. Any time I try to run any pod command, I get the following message.
[!] The "master" repo requires CocoaPods 0.35.0 - (currently using 0.34.1)
I understand what that means, and would like to remove the master repo as a dependency altogether, but it seems like that isn't an option. Any insights?
This created quite the fire drill for us today. We ended up changing our build scripts to run a custom pod install alias, which rolls back the min version in the CocoaPods-version.yml.
alias myPodInstall="sed -i -e 's/min: 0.35.0/min: 0.34.0/' ~/.cocoapods/repos/master/CocoaPods-version.yml; pod install"
Definitely a hack, but it unblocked us as we push for our release. Perhaps this helps others out there in a similar situation.

How to do `pod trunk push` to replace an existing version of podspec

I already did a pod trunk push for a podspec version. Can I push it again and overwrite the existing one?
I tried it but it gives me this error.
$ pod trunk push Parse-iOS-SDK.podspec
Validating podspec
-> Parse-iOS-SDK (1.2.21)
[!] Unable to accept duplicate entry for: Parse-iOS-SDK (1.2.21)
Is there a similar command like git push -f force push it?
Ref:
http://guides.cocoapods.org/making/getting-setup-with-trunk
It is now possible to do this by first deleting the pod, and then re-pushing it:
pod trunk delete NAME VERSION
Then
pod trunk push PODSPEC
There should be a really good reason to do so, however, and the best practice is to never delete versions but instead push new ones (what Keith said).
2017 Edit: You can now delete pods on trunk, see this answer
Previous answer:
You cannot overwrite a spec using trunk. You should just push a new version with your changes. You can also submit a pull request to the specs repo but we recommend just pushing a new version.

Cloning repository from ruby

I'm creating a Sinatra app that will pull in data from a remote git repository.
I've taken a look at the ruby-git gem, but I get cannot load such file -- git on the line of require 'git'. The gem is installed and in my Gemfile.
I'm not sure if this is the correct way about going about this, but essentially I want the app to checkout a git repository for pulling in data.
Ended up using the system command:
system("git clone #{$config['repository']} content")

Resources