https://developer.apple.com/download/all/
- 下载sourcetree
- 配置ssh
ssh-keygen -t rsa -f ~/.ssh/gitee_rsa -C "xxxxxx@qq.com "
拿到公钥后 cat 公钥,配置到到gitee
验证配置的ssh是否成功:
ssh -T git@gitee.com
- 配置.gitconfig
git config --global http.postBuffer 1048576000
git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
git config --global user.name xxx
git config --global user.email xxxxxx@qq.com
git config --global user.password xxxxxxxxxxxx
查看list:git config --list
[http]
postBuffer = 1048576000
lowSpeedLimit = 0
lowSpeedTime = 999999
[user]
name = xxx
email = xxxxxx@qq.com
password = xxxxxxxxxxxx
- 设置.ssh 下config文件
Host gitee.com
Hostname gitee.com
User xxxxxx@qq.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitee_rsa
UseKeychain yes
AddKeysToAgent yes
安装cocoapods
1. 安装homebrew
/bin/zsh -c "$(curl -fsSl https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
版本验证安装是否成功:
brew -v
2. 安装ruby
查看是否有
gem sources -l
有先移除
gem sources --remove https://gems.ruby-china.com
来查看所有可用的Ruby版本
brew search ruby
替换NEW_VERSION为你想要安装的具体版本号
brew install ruby@NEW_VERSION
ruby -v
更换源
gem sources --add https://gems.ruby-china.com --remove https://rubygems.org/
3. 安装 rvm
curl -L https://get.rvm.io | bash -s stable
source ~/.bashrc
source ~/.bash_profile
rvm -v
4. 安装cocoapods
卸载cocoapods (sudo 加权限进行处理)
sudo gem uninstall -n /usr/local/bin cocoapods
安装cocoapods
sudo gem install -n /usr/local/bin cocoapods
pod setup
pod --version
执行命令 pod install
pod install
过程中error:
参考解决方法:
https://blog.csdn.net/weixin_38716347/article/details/116845164
常见pod命令
$ pod --version #查看cocoapod 版本
$ gem install cocoapods -n /usr/local/bin #更新cocoapods
$ cd ~/.cocoapods/repos #进入 repos目录
$ open ~/.cocoapods/repos #进入 repos目录
$ pod repo #查看当前源
$ pod repo add master https://xxx.git #添加源
$ pod repo remove trunk #移除指定源