无法添加具有url的源

时间:2023-01-18 23:30:18

[!] Unable to add a source with url git@github.com:CocoaPods/Specs.git named master-1. You can try adding it manually in ~/.cocoapods/repos or via pod repo add. please any help

[!无法添加url git@github.com:CocoaPods/Specs.git命名为master1。您可以尝试在~/中手动添加它。请帮忙。

10 个解决方案

#1


27  

You may need to reset your command line tools:

您可能需要重置您的命令行工具:

sudo xcode-select -r

I was receiving the same error message. Then I noticed, that the wrong Xcode environment was selected (it pointed to an old version which I deleted in the meantime). The command above resets it to the default command line path.

我收到了同样的错误信息。然后我注意到,选择了错误的Xcode环境(它指向我同时删除的旧版本)。上面的命令将它重置为默认的命令行路径。

Alternatively you might have no command line tools installed. In that case, download them from the Apple site and install them.

或者,您可能没有安装命令行工具。在这种情况下,从苹果网站下载并安装它们。

#2


26  

Please follow this link for this problem. Its possible to forgott set your newly install Xcode path on command-line tool. Xcode-->Preferences-->Locations-->Command line tool --> set your Xcode.

请按照这个链接来解决这个问题。可以在命令行工具上设置新安装的Xcode路径。Xcode——>首选项——> location——>命令行工具——>设置您的Xcode。

#3


5  

Go to ~/.cocoapods/repos and run git clone https://github.com/CocoaPods/Specs.git master

去~ /。cocoapods/repos和运行git克隆服务器https://github.com/CocoaPods/Specs.git master

#4


3  

When you get above error it means, you didn't do the pod setup

当你得到上面的错误意味着,你没有做pod设置

instructions:

产品说明:

  1. First install the cocoapods in you Mac if it is not already installed. Use terminal.

    如果还没有安装的话,首先在Mac中安装可可豆。使用终端。

    Xcode 7 + 8

    sudo gem install cocoapods --pre

    sudo gem安装可可豆——pre

    Xcode 7

    sudo gem install activesupport -v 4.2.6 sudo gem install cocoapods

    sudo gem安装activesupport - v4.2.6 sudo gem安装cocoapods

  2. Set up the pod using command pod setup

    使用命令pod设置来设置pod

after doing these initial set up you are ready to make your project as work space project. You can follow these commands using terminal

完成这些初始设置之后,您就可以将您的项目作为工作空间项目。您可以使用终端来执行这些命令。

  1. Goto Project location folder : ~/Destop/SampleProject
  2. Goto项目位置文件夹:~/Destop/SampleProject
  3. Create pod file : pod init
  4. 创建pod文件:pod init
  5. List down your cocoa pods init it :

    列出你的可可豆荚吧:

    # Uncomment the next line to define a global platform for your project
    #platform :ios, '9.0'
    
    target 'SampleProject' do
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!
    
    # Pods for SampleProject
    pod 'SlideMenuControllerSwift'
    
    
    target 'SampleProjectTests' do
     inherit! :search_paths
    # Pods for testing
    end
    
    target 'SampleProjectUITests' do
     inherit! :search_paths
     # Pods for testing
    end
    

    end

    结束

it will help you.

它将帮助你。

or else

否则

After installation of cocoapods than you can download the cocoa master repo manually into Mac.

在安装了cocoapods之后,您可以将cocoa master repo手动下载到Mac中。

    $ cd /Users/username/.cocoapods/repos 
    $ git clone https://github.com/CocoaPods/Specs.git master

#5


1  

I had the same problem , actually the problem was that command line was not able to find a path to my Xcode. Therefore the simplest solution that i found was to give a suitable location of xcode.

我也有同样的问题,实际上问题是命令行无法找到Xcode的路径。因此,我找到的最简单的解决方案是给出一个合适的xcode位置。

For it:

:

  1. Go to Xcode > Preferences
  2. 转到Xcode >首选项
  3. Choose Location tab
  4. 选择位置选项卡
  5. Select the Xcode in Command Line tools:- 无法添加具有url的源
  6. 选择Xcode中的命令行工具:-

thats it. I hope that works for you. All the best

这是它。我希望这对你有用。愿一切都好!

#6


1  

Please Follow this steps:

请参照下面的步骤:

Open Terminal

打开终端

1] sudo xcode-select -r

1]sudo xcode-select - r

2] Xcode-->Preferences-->Locations-->Command line tool --> set your Current Xcode Version.

2] Xcode——>首选项——> location——>命令行工具——>设置您当前的Xcode版本。

3] Edit Podfile and save

3)编辑Podfile并保存

4] pod install

4)舱安装

Thats it.

这是它。

#7


1  

  1. $ cd /Users/username/.cocoapods/repos
  2. $ cd /用户/用户名/ .cocoapods /回购
  3. remove folder master if it exists
    rm -rf master
    $ git clone https://github.com/CocoaPods/Specs.git master
  4. 如果存在rm -rf master $ git克隆,则删除它
  5. pod setup
  6. 舱设置

that's all.

这是所有。

#8


0  

For me, I had to pod setup first.

对我来说,我必须先安装支架。

#9


0  

This is often happening on initial pod install. I tried all and this steps helped me

这通常发生在最初的pod安装上。我试了所有的方法,这些步骤帮助了我。

Please follow these steps:

请遵循以下步骤:

1] pod repo update

1]pod回购更新

2] pod install

2)舱安装

I hope that works for you. All the best

我希望这对你有用。愿一切都好!

#10


0  

Meet the same error and I have solved it by :

遇到同样的错误,我通过:

1. Open your terminal
2. Go to the directory    : cd /User/YOUR_NAME/.cocoapods/repos/
3. remove the master file : rm -rf master
4. Clone the CocoaPods    : git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master

Note. I add the target path ~/.cocoapods/repos/master to avoid the mistake that your current file path is not ~/.cocoapods/repos/master

请注意。我添加目标路径~/。避免当前文件路径不是~/.cocoapods/repos/master的错误

5. Run the setup          : pod setup 

#1


27  

You may need to reset your command line tools:

您可能需要重置您的命令行工具:

sudo xcode-select -r

I was receiving the same error message. Then I noticed, that the wrong Xcode environment was selected (it pointed to an old version which I deleted in the meantime). The command above resets it to the default command line path.

我收到了同样的错误信息。然后我注意到,选择了错误的Xcode环境(它指向我同时删除的旧版本)。上面的命令将它重置为默认的命令行路径。

Alternatively you might have no command line tools installed. In that case, download them from the Apple site and install them.

或者,您可能没有安装命令行工具。在这种情况下,从苹果网站下载并安装它们。

#2


26  

Please follow this link for this problem. Its possible to forgott set your newly install Xcode path on command-line tool. Xcode-->Preferences-->Locations-->Command line tool --> set your Xcode.

请按照这个链接来解决这个问题。可以在命令行工具上设置新安装的Xcode路径。Xcode——>首选项——> location——>命令行工具——>设置您的Xcode。

#3


5  

Go to ~/.cocoapods/repos and run git clone https://github.com/CocoaPods/Specs.git master

去~ /。cocoapods/repos和运行git克隆服务器https://github.com/CocoaPods/Specs.git master

#4


3  

When you get above error it means, you didn't do the pod setup

当你得到上面的错误意味着,你没有做pod设置

instructions:

产品说明:

  1. First install the cocoapods in you Mac if it is not already installed. Use terminal.

    如果还没有安装的话,首先在Mac中安装可可豆。使用终端。

    Xcode 7 + 8

    sudo gem install cocoapods --pre

    sudo gem安装可可豆——pre

    Xcode 7

    sudo gem install activesupport -v 4.2.6 sudo gem install cocoapods

    sudo gem安装activesupport - v4.2.6 sudo gem安装cocoapods

  2. Set up the pod using command pod setup

    使用命令pod设置来设置pod

after doing these initial set up you are ready to make your project as work space project. You can follow these commands using terminal

完成这些初始设置之后,您就可以将您的项目作为工作空间项目。您可以使用终端来执行这些命令。

  1. Goto Project location folder : ~/Destop/SampleProject
  2. Goto项目位置文件夹:~/Destop/SampleProject
  3. Create pod file : pod init
  4. 创建pod文件:pod init
  5. List down your cocoa pods init it :

    列出你的可可豆荚吧:

    # Uncomment the next line to define a global platform for your project
    #platform :ios, '9.0'
    
    target 'SampleProject' do
    # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!
    
    # Pods for SampleProject
    pod 'SlideMenuControllerSwift'
    
    
    target 'SampleProjectTests' do
     inherit! :search_paths
    # Pods for testing
    end
    
    target 'SampleProjectUITests' do
     inherit! :search_paths
     # Pods for testing
    end
    

    end

    结束

it will help you.

它将帮助你。

or else

否则

After installation of cocoapods than you can download the cocoa master repo manually into Mac.

在安装了cocoapods之后,您可以将cocoa master repo手动下载到Mac中。

    $ cd /Users/username/.cocoapods/repos 
    $ git clone https://github.com/CocoaPods/Specs.git master

#5


1  

I had the same problem , actually the problem was that command line was not able to find a path to my Xcode. Therefore the simplest solution that i found was to give a suitable location of xcode.

我也有同样的问题,实际上问题是命令行无法找到Xcode的路径。因此,我找到的最简单的解决方案是给出一个合适的xcode位置。

For it:

:

  1. Go to Xcode > Preferences
  2. 转到Xcode >首选项
  3. Choose Location tab
  4. 选择位置选项卡
  5. Select the Xcode in Command Line tools:- 无法添加具有url的源
  6. 选择Xcode中的命令行工具:-

thats it. I hope that works for you. All the best

这是它。我希望这对你有用。愿一切都好!

#6


1  

Please Follow this steps:

请参照下面的步骤:

Open Terminal

打开终端

1] sudo xcode-select -r

1]sudo xcode-select - r

2] Xcode-->Preferences-->Locations-->Command line tool --> set your Current Xcode Version.

2] Xcode——>首选项——> location——>命令行工具——>设置您当前的Xcode版本。

3] Edit Podfile and save

3)编辑Podfile并保存

4] pod install

4)舱安装

Thats it.

这是它。

#7


1  

  1. $ cd /Users/username/.cocoapods/repos
  2. $ cd /用户/用户名/ .cocoapods /回购
  3. remove folder master if it exists
    rm -rf master
    $ git clone https://github.com/CocoaPods/Specs.git master
  4. 如果存在rm -rf master $ git克隆,则删除它
  5. pod setup
  6. 舱设置

that's all.

这是所有。

#8


0  

For me, I had to pod setup first.

对我来说,我必须先安装支架。

#9


0  

This is often happening on initial pod install. I tried all and this steps helped me

这通常发生在最初的pod安装上。我试了所有的方法,这些步骤帮助了我。

Please follow these steps:

请遵循以下步骤:

1] pod repo update

1]pod回购更新

2] pod install

2)舱安装

I hope that works for you. All the best

我希望这对你有用。愿一切都好!

#10


0  

Meet the same error and I have solved it by :

遇到同样的错误,我通过:

1. Open your terminal
2. Go to the directory    : cd /User/YOUR_NAME/.cocoapods/repos/
3. remove the master file : rm -rf master
4. Clone the CocoaPods    : git clone https://git.coding.net/CocoaPods/Specs.git ~/.cocoapods/repos/master

Note. I add the target path ~/.cocoapods/repos/master to avoid the mistake that your current file path is not ~/.cocoapods/repos/master

请注意。我添加目标路径~/。避免当前文件路径不是~/.cocoapods/repos/master的错误

5. Run the setup          : pod setup