Background: POD update code issues
The project relies on Cocoapods to manage third-party libraries
- There are frequent implementations in the project
pod update
Update third-party libraries - Do this with Jenkins, Fastlane, and other continuous integration tools
pod update
Update third-party libraries - On the terminal, access Github to download or upload resources
Access to Github is often problematic due to issues such as DNS contamination. When Jenkins was used to package IPA, problems such as ssl_error_syscall in connection to github.com:443 were always encountered when updating a third-party library, resulting in package failure. A project relies on more than 10 third-party libraries. Click build once, occasionally one library can be installed successfully, and then the next one may fail. You need to click ‘rebuild’ repeatedly, depending on luck. The following is an example of failure:
The solution
Set up the proxy to resolve the problem
- Set up the global proxy for the terminal
First, the proxy (scientific Web) tool I use is Clas()X. Click the Cl()shX icon in the top bar of your computer screen, and then click the option to copy terminal Agent commands to get the command line. Then, configure the proxy for the terminal. The default Shell terminal for macOS Mojave and lower versions is bash, and we need to modify the.bash_profile file.
vi ~/.bash_profile
Copy the code
Then rewrite the command copied from the previous step into the.bash_profile file in the following format:
Export https_proxy=http://127.0.0.1:7890 export http_proxy=http://127.0.0.1:7890 export All_proxy = socks5: / / 127.0.0.1:7890Copy the code
After saving the configuration and exiting, run the following command to make the configuration take effect:
source ~/.bash_profile
Copy the code
Starting from macOS Catalina, Apple uses ZSH as the default Shell terminal. The difference is that you need to modify the. ZSHRC file. Other Settings and methods are the same.
vi ~/.zshrc
Copy the code
ZSHRC file with the following format:
Export https_proxy=http://127.0.0.1:7890 export http_proxy=http://127.0.0.1:7890 export All_proxy = socks5: / / 127.0.0.1:7890Copy the code
After saving the configuration and exiting, run the following command to make the configuration take effect:
source ~/.zshrc
Copy the code
In this link, you can view MAC system history and select the correct configuration for your system. After the configuration is complete, run the curl -vv https://www.google.com command on the newly opened terminal to check whether the proxy is enabled. 2. Set the Git agent to run the following command in a terminal window
Git config --global http.proxy http://127.0.0.1:7890 git config --global HTTPS. Proxy http://127.0.0.1:7890Copy the code
Once the above two Settings are complete, you can access Github from your terminal.