'How to add a artifactory? i'm getting error with pod repo-art add command

I am trying to add a artifactory using below command

pod repo-art add [artifactory name] "url"

but i'm getting following error

[!] Error getting the index from Artifactory at: 'url' : undefined local variable or method `user_agent_argument' for #<Pod::Downloader::Http:0x00007f9d3faebdf0>

Please help!



Solution 1:[1]

try Remove the existing repos in ~ /. Cocoapods path

Solution 2:[2]

You need to install cocoapods-art plugin to provision CocoaPods packages from Artifactory to the pod command-line tool. The very first thing you need to ensure is to install this plugin. It is a Ruby gem, and your machine should have the latest Ruby installed. Install the gem cocoapods-art using the following command:

> gem install cocoapods-art

Then, you will need to add the specs of the Artifactory repository into your machine using

pod repo-art add <name> <url>

Solution 3:[3]

You need to reinstall cocoapods via gem. I had installed it by homebrew, and cocoa pods-art by gem which created some issues.

Solution 4:[4]

you need to reinstall gem you can try gem install cocoapods-art --user-install instead of gem install cocoapods-art

"user install" the cocoapods-art and try pod repo-art add [artifactory name] "url"

It worked for me

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zhuzhu
Solution 2 Ritu pal
Solution 3 konradowy
Solution 4 Sheereen S