Search code examples
iosproxycocoapods

Pod install, proxy issue


I'm trying to run pod install in vain :

Analyzing dependencies
Creating shallow clone of spec repo `master` from `https://github.com/CocoaPods/Specs.git`
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

I think i have a proxy issue, but i don't know how to fix it. These is the result when i try pod setup

Setting up CocoaPods master repo
[!] /usr/bin/git clone https://github.com/CocoaPods/Specs.git master --depth=1

Cloning into 'master'...

fatal: unable to access 'https://github.com/CocoaPods/Specs.git/':Received HTTP code 503 from proxy after CONNECT

Solution

  • It is possible, that your system proxy settings do not apply to the bash. Type this into bash before running pod install:

    export http_proxy=<YOUR_HTTP_PROXY>
    export https_proxy=<YOUR_HTTPS_PROXY>
    

    If it helps, you can make proxy settings load when bash starts by adding above commands to the .bash_profile (create file if it does not exist) in your home directory.