# CocoaPodsSpecsMirrorUsage **Repository Path**: tobedefined/CocoaPodsSpecsMirrorUsage ## Basic Information - **Project Name**: CocoaPodsSpecsMirrorUsage - **Description**: 关于CocoaPods 镜像源的使用说明,切换源地址方法以及使用方法。 - **Primary Language**: HTML - **License**: MIT - **Default Branch**: master - **Homepage**: https://gitee.com/tobedefined/Specs - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-02-12 - **Last Updated**: 2022-06-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: cocoapods ## README ## 基本使用 #### clone ```sh git clone https://gitee.com/tobedefined/Specs.git ~/.cocoapods/repos/master ``` or ``` git clone git@gitee.com:tobedefined/Specs.git ~/.cocoapods/repos/master ``` > ① 若 `master` 文件夹已经存在, 可以考虑使用下方的切换源命令先进行换源或者删除 `master` 文件夹 > ② 若 `clone` 完成之后想进行切换源, 也可以在 `clone` 之后使用下方的切换源命令进行换源 > ③ 貌似开源中国这种同步的仓库有问题([issue](https://gitee.com/oschina/git-osc/issues/I134OC?from=project-issue)),有时 `https` 方式无法下载,就使用 `ssh` 方式下载 #### 切 github 源 ```sh cd ~/.cocoapods/repos/master git remote set-url origin https://github.com/CocoaPods/Specs.git ``` #### 切 gitee 源 ```sh cd ~/.cocoapods/repos/master git remote set-url origin https://gitee.com/tobedefined/Specs.git ``` or ```sh cd ~/.cocoapods/repos/master git remote set-url origin git@gitee.com:tobedefined/Specs.git ``` > 貌似开源中国这种同步的仓库有问题([issue](https://gitee.com/oschina/git-osc/issues/I134OC?from=project-issue)),有时 `https` 方式无法下载,就设置使用 `ssh` 方式下载 ## 注意事项 如果 `Podfile` 中使用了 `source`, `source` 的地址需要与源的地址对应, 否则会重新下载 `source` 的仓库