Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with Cocoapods, showing error 'Couldn't determine repo type for URL' when installing pods

I used Cocoapods a lot, but recently whenever I was updating the pods (pod update), it started duplicating files and often didn't let me create a build for the App Store.

I updated Cocoapods to the last version possible but still didn't solve that. Then I tried to remove and re-install it.

Now is occurring another issue. When I try to run pod install on any project, pods are not getting installed like previously, but is showing this error:

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

Previously, this never happened, but now it's happening even on projects that Cocoapods worked like a charm. What could be the problem?

Thank you in advance.

like image 600
ee.bt Avatar asked Jan 24 '23 05:01

ee.bt


2 Answers

The error message says there's a permission issue:

Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644

So in order to fix the permission, you should do this:

chmod 600 ~/.netrc

Then try to run pod install again. If the root cause was really this permissions issue then everything should work.

like image 161
0xced Avatar answered Jan 26 '23 20:01

0xced


In addition to 0xced's answer: Check and fix possible syntax errors in ~/.netrc .

like image 41
pipacs Avatar answered Jan 26 '23 20:01

pipacs