2
votes

Our setup includes a company wide Artifactory that holds in-house-built artifacts as well as goes out and fetches publicly available artifacts. I’m trying to setup a local Artifactory at our location that would fetch publicly available artifacts through the regular internet, but would connect to the company wide Artifactory for our in-house-built artifacts. Is this possible?

In my local Artifactory setup, I put the company wide Artifactory URL as a Remote Repository. I can hit the Test button and it tells me that it successfully connected. However, when I go to download an artifact it does not work. I would like to say that publicly available artifacts can be fetched through my local Artifactory, so at least I can get to jcenter.bintray.

Can one Artifactory be connected to another Artifactory? If yes, is there a way to test if this connection works

I don’t think we would be using all the contents of the company wide Artifactory, so I don’t want to do an export and import to the local or do replication. I would prefer if we could fetch on demand. Is this possible?


Edit: Thanks to @DarthFennec pointing me to Smart Remote Repositories I have solved my problem. To others who have the same problem

  • Please follow the steps mentioned on the previously mentioned page to set up the Smart Remote Repository. In my case Artifactory did not detect that the remote was another instance of Artifactory and did not give me any options to set, but I was not interested in these anyway.
  • Note You can always click the Test button to make sure that your connection to the Remote Repository works.
  • Next, go to the Admin -> Virtual Repositories select your Repository Key and select your Smart Repository from the Available Repositories so that it moves into the Selected Repositories. Click Save & Finish at the bottom and you should be good to go.
1
"when I go to download an artifact it does not work" What does that mean? Are you getting an error? If so, what error? How are you configuring the remote? How are you downloading the artifact? Might there be something on your network that's preventing your access? This configuration should definitely work, Artifactory even has special support for it. - DarthFennec
@DarthFennec - Thank you for pointing me to the documentation for Smart Remote Repositories jfrog.com/confluence/display/RTF/Smart+Remote+Repositories -> This is what I needed and I have now gotten this to work. Please submit this as an answer so I can accept this. - O.O.
Not to nitpick, but you should have edited the answer, not the question. :) - Chaim Eliyah

1 Answers

2
votes

I'm not sure exactly what your problem ended up being, but if you want to remote one Artifactory repository from another, it should be a smart remote repository. This is when Artifactory detects that a remote is pointing at another Artifactory, and it enables a number of extra features, like download statistics, property replication, and remote browsing.

An important thing to keep in mind when configuring a smart remote repository is that depending on the package type, you might need to point the remote at <artifactory>/api/<type>/<repo>, rather than just <artifactory>/<repo>. This is the case for Bower, Chef, CocoaPods, Docker, Go, NuGet, Npm, Php Composer, Puppet, Pypi, RubyGems, and Vagrant repositories. Other repository types should use the standard <artifactory>/<repo> URL.