- Install private-bower
- Click HERE
- Your installation will look like this:
- Using the UI, add your packages to private-bower
- Configure Artifactory
- Login as admin
- Create three repositories
- Remote public bower repo (see #3 below)
- Remote private bower repo (see #4 below)
- Virtual bower repo (see #5 below)
- Create a public bower repo
- In Artifactory 7.x, navigate to Administration > Repositories tab > Repositories > Add Repositories -> Remote Repository (in Artifactory versions 6.x and under, navigate to the Admin tab > Remote > New > Bower)
- Use the settings shown in the following screenshot:
- Click Save & Finish
- Create a private bower repo
- In Artifactory 7.x, navigate to Administration > Repositories tab > Repositories > Add Repositories -> Remote Repository (in Artifactory versions 6.x and under, navigate to the Admin tab > Remote > New > Bower)
- Use the settings shown in the following screenshot, but make the modifications specified in the next four bullet points:
- Change the URL from https://github.com/ to your GitLab URL
- Change the Git Provider from GitHub to Custom
- Change the Download URL to {0}/{1}/repository/archive.{3}?ref={2}
- Change the Registry URL from https://bower.herokuapp.com to your private-bower URL (e.g., http://10.60.1.94:5678)
- Click Save & Finish
- Create a virtual bower repo
- In Artifactory 7.x, navigate to Administration > Repositories tab > Repositories > Add Repositories -> Remote Repository (in Artifactory versions 6.x and under, navigate to the Admin tab > Remote > New > Bower)
- As shown on the bottom righthand side of the screenshot below, under Available Repositories, select bower-remote-public and bower-remote-private, and move them to the Selected Repositories field.
- Click Save & Finish
- Configure private-bower to Use Your virtual-remote-bower repository
- Navigate to Artifacts > virtual-remote-bower (which will be found in your Artifactory Repository browser)
- Click on Set Me Up and follow the instructions provided there
-
In your .bowerrc file, replace the default private-bower registry with the following:
{ "registry" : "http://10.60.1.94:8081/artifactory/api/bower/virtual-remote-bower", "resolvers" : [ "bower-art-resolver" ] }
-
Take your setup for a test drive
-
Run the following command:
bower install bower-gitlab-demo
Thereafter, you should see something similar to the following screenshot:
-
Now run this command:
bower install angular
- Thereafter, you should see something similar to the following screenshot: