Custom podspec clone works, but installation of pod fails

We have a custom podspec repo which get cloned via ssh through a source command in the Podfile.
When pod install is invoked, the installation of the private pod fails because it’s attempting to use http(s). Any tips?

Just before someone points this article out:

It doesn’t explain the problem I’m experiencing.

Hi @bsarrazin,

Our CocoaPods Installer step does not change anything in your configs, it pretty much just runs pod install. So if you see HTTPS urls in pod install's log which should not be there then that’s related to something in your pod config - I’d suggest you to follow the first section of this local debug guide: How to debug your build locally / “It works on my Mac/PC but not on”

  1. Do a clean git clone, into a new directory
  2. Then do pod install there

and check its log whether you see those https URLs.

If that wouldn’t help please copy paste the related build’s URL and we’ll look into it ASAP! :slight_smile:

hey @viktorbenei sorry for the delay
take a look at this build:

The podspec repo is private. Can you help?

Let me try these steps.

@viktorbenei it works fine locally with Bitrise CLI.
I’ve enabled Bitrise Support on the app, let me know what else I can do to help?

@viktorbenei bump
definitely a high priority for our team at the moment
am happy to make time to get on a call if you wish, let me know!

@bsarrazin checked the log:

[10:04:57]: ▸ e[0;35;49mCloning spec repo `X` from ``e[0m
[10:04:57]: ▸ e[0;35;49m[!] Unable to add a source with url `` named `X`.e[0m

This issue is mentioned in the submodule docs you linked (, specifically the first blue box (Use SSH URLs everywhere) on the page.

In short, if you use SSH keys for auth (which you do) then you should use the SSH git clone URLs for every private repo, including pod spec & pod repos. When you use a https:// git clone URL git itself will ignore SSH auth.

Please use the git@... style SSH git clone URL instead of the https:// one.

Alternatively you can also switch to auth for https, but your current setup uses SSH key based auth.

Let me know if you’d have any questions! :slight_smile:

Another option: reconfigure git to use SSH git clone URLs for github instead of HTTPS ones

Note: this affects every git clone after running this git config!

E.g. using a Script step:

git config --global url."".insteadOf ""

This instructs git that in every case when the git clone URL starts with it should replace it with before contacting the server.

1 Like

I did try using ssh before and it failed. Tried again, failed.
That last suggest about a script step did the trick!
Thank you @viktorbenei, much much much appreciation for your help!

1 Like

Any time :wink:

This helped me as well, thank you SO much!

1 Like