iOS - 解决Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named

简介: [!] Unable to add a source with url `https://github.com/CocoaPods/Specs.
[!] 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`.
  • 1
  • 2

解决方案:

pod repo add master https://github.com/CocoaPods/Specs.git
  • 1

然后提示执行’pod setup’,如果出现

[!] The `master` repo is not a git repo.
  • 1

进入/users/你的用户名/.cocoapods/repos,删除master文件夹 
然后执行

pod setup
如果pod setup 不顺利 
采用:Git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master 该过程作用与 pod setup作用相同
  • 1

如果是安装多个Xcdoe,还需要选择Xcode的路径

sudo xcode-select -switch /Applications/Xcode.app/
  • 1

在终端里输入下方命令可以知道Xcode的路径:

xcode-select -p

2: ---------------------------------------------

问题:cocoapods was not able to update the 'master' repo.if it is a unexpected issue and persists you can inspect it running 'pod repo update --verbose'



尝试解决:

尝试1、根据提示,跑一下 pod repo update --verbose

尝试2、如果还是出现原来问题,升级 gem update cocoapods(如果CocoaPods还不是最新版本)

尝试3、如果升级还是出现原来的问题,那么重装CocoaPods 。

             首先查看本地装了关于cocoapods的哪些东西,在终端输入gem list --local | grep cocoapods

             

             接着全部卸掉上面的,在终端输入gem uninstall cocoapods

再安装,在终端输入gem install cocoapods

尝试4、如果问题依旧,那么请清除缓存再pod setup
清除命令sudo rm -fr ~/.cocoapods/repos/master
再pod setup

3 安装 pod 报错--------------------------------

ERROR: While executing gem ... (OpenSSL::SSL::SSLError)

原创  2015年07月14日 23:11:37
方法一:

1) outdate open SSL

$ rvm -v
$ rvm get head

2) outdate bundle 

$ gem install bundle

方法二:
$ gem update --system

方法三:
$ apt-get install openssl

目录
相关文章
|
4月前
|
安全 网络安全 开发工具
百度搜索:蓝易云【git无法使用git协议clone github仓库问题解决方法】
通过尝试以上解决方法,你应该能够解决无法使用Git协议克隆GitHub仓库的问题。选择适合你网络环境和要求的方法,并根据需要进行相应的配置。
183 2
|
2月前
|
人工智能 运维 Linux
一文了解IntelliJ IDEA如何使用git上传代码到GitHub(附常见问题解决方案)
一文了解IntelliJ IDEA如何使用git上传代码到GitHub(附常见问题解决方案)
82 0
|
17天前
|
Shell 开发工具 git
【Github】git bash将本地工程上传至github
【Github】git bash将本地工程上传至github
|
1月前
|
缓存 开发工具 数据安全/隐私保护
通过一篇文章带你玩转git和GitHub
在现代软件开发中,版本控制系统是不可或缺的工具。Git和Github是其中最受欢迎的组合。Git是一个开源的分布式版本控制系统,用于追踪代码的改动,而Github则是一个基于Git的代码托管平台,提供了代码托管、协作开发等功能。
81 2
通过一篇文章带你玩转git和GitHub
|
1月前
|
Linux 开发工具 git
Git与GitHub:解锁版本控制的魔法盒子
Git与GitHub:解锁版本控制的魔法盒子
30 1
|
2月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
|
2月前
|
安全 Shell 网络安全
Git学习---Git快速入门、Git基础使用、Git进阶使用、Git服务器使用(IDEA集成GitHub、Gitee、GitLab)、GitHub Desktop客户端
Git学习---Git快速入门、Git基础使用、Git进阶使用、Git服务器使用(IDEA集成GitHub、Gitee、GitLab)、GitHub Desktop客户端
130 0
|
3月前
|
网络安全 开发工具 git
Git在windows下上传文件至github流程
Git在windows下上传文件至github流程
22 0
|
开发工具 git 开发者
Git与Github两者的区别|学习笔记
快速学习Git与Github两者的区别
62 0
|
开发工具 git CDN
Git与GitHub学习笔记(五)一次提交失败的记录
代码已经跟踪了,添加注释说明,但是总是添加不了 error: pathspec 'live-page'' did not match any file(s) known to git. 重复了好多遍,最后发现代码还是没有提交 D:\wamp64\www\study-line>git commi...
1628 0