Cocoapods 的问题,在安装 pods 时显示错误“无法确定 URL 的回购类型”
Problem with Cocoapods, showing error 'Couldn't determine repo type for URL' when installing pods
我经常使用 Cocoapods
,但最近每当我更新 pods (pod update
) 时,它开始复制文件并且经常不让我创建构建App Store。
我已将 Cocoapods 更新到可能的最新版本,但仍未解决该问题。然后我尝试删除并重新安装它。
现在又出现了一个问题。当我尝试在任何项目上 运行 pod install
时,pods 没有像以前那样安装,而是显示此错误:
myUser$ pod install
Analyzing dependencies
[!] Couldn't determine repo type for URL: `https://github.com/CocoaPods/Specs.git`: Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
以前,这从未发生过,但现在甚至在 Cocoapods 工作得很好的项目中也发生了。可能是什么问题?
提前致谢。
错误消息说存在权限问题:
Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
因此,为了修复权限,您应该这样做:
chmod 600 ~/.netrc
然后再尝试 运行 pod install
。如果根本原因真的是这个权限问题,那么一切都应该有效。
除了 0xced 的回答:检查并修复 ~/.netrc 中可能存在的语法错误。
我经常使用 Cocoapods
,但最近每当我更新 pods (pod update
) 时,它开始复制文件并且经常不让我创建构建App Store。
我已将 Cocoapods 更新到可能的最新版本,但仍未解决该问题。然后我尝试删除并重新安装它。
现在又出现了一个问题。当我尝试在任何项目上 运行 pod install
时,pods 没有像以前那样安装,而是显示此错误:
myUser$ pod install
Analyzing dependencies
[!] Couldn't determine repo type for URL: `https://github.com/CocoaPods/Specs.git`: Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
以前,这从未发生过,但现在甚至在 Cocoapods 工作得很好的项目中也发生了。可能是什么问题?
提前致谢。
错误消息说存在权限问题:
Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
因此,为了修复权限,您应该这样做:
chmod 600 ~/.netrc
然后再尝试 运行 pod install
。如果根本原因真的是这个权限问题,那么一切都应该有效。
除了 0xced 的回答:检查并修复 ~/.netrc 中可能存在的语法错误。