Closed sheeley closed 8 years ago
Hi,
I can't seem to see anything wrong with the configurations but I would try with installing both bower and bower-art-resolver globally (e.g. npm i -g bower-art-resolver
) and check again.
Hi, I tried that: npm install -g bower bower-art-resolver
➜ bower-test npm list -g | grep bower
├─┬ bower@1.5.2
│ ├─┬ bower-config@0.6.1
│ ├── bower-endpoint-parser@0.2.2
│ ├─┬ bower-json@0.4.0
│ ├── bower-logger@0.2.2
│ ├─┬ bower-registry-client@0.3.0
├─┬ bower-art-resolver@2.0.1
Still seeing this error:
➜ bower-test bower install jquery
bower jquery#* not-cached git://github.com/jquery/jquery.git#*
bower jquery#* resolve git://github.com/jquery/jquery.git#*
bower jquery#* ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/jquery/jquery.git", exit code of #128 fatal: unable to connect to github.com: github.com[0: 127.0.0.1]: errno=Connection refused
Additional error details:
fatal: unable to connect to github.com:
github.com[0: 127.0.0.1]: errno=Connection refused
When I hit the artifactory URL itself (http://artifactory.../artifactory/api/bower/bower-dev-repo/packages/jquery
), I see this:
{
"name" : "jquery",
"url" : "git://github.com/jquery/jquery.git"
}
I assume that URL should be replaced by the artifactory one?
What else can I do to help debug?
Is this setup correct?
It looks like your bower-dev-repo is not declared as a bower repository. By the way, upgrading to the latest version 4.1.0 of Artifactory will make this whole setup process a lot easier :)
@freddy33 Sorry, I didn't include bower-dev-repo:
I'm not the owner of our artifactory, but will pass that info along :)
@sheeley , We've been trying to replicate this issue, and the only way we managed to have a situation where the bowerrc contains the above configuration and bower still resolves from github is when we override the data inside the bowerrc file with another file in a preceding location, environment variables or CLI flags (as the bower documentation states). Could it be that your bowerrc is overridden? As a troubleshooting step, you can try and force the registry URL through a command line argument as follows: bower install jquery --config.registry=https://bower.herokuapp.com This should resolve from github (same behavior as you experience today). Then try: bower install jquery --config.registry=Artifactory registry URL If you get an error saying: Could not find appropriate resolver for art://jquery/jquery it might mean that the configuration is not taken from the bowerrc you're looking at, but from a different file or env var. Let us know if the above provides any new clue.
Thanks for taking a look, @eyalbe4.
I don't have another .bowerrc
or any env variables set (I've just started to use bower), there's just the one I shared earlier, unfortunately.
When installing using the command line args, I still see it going to github:
bower-test bower install jquery --config.registry=https://bower.herokuapp.com
bower jquery#* not-cached git://github.com/jquery/jquery.git#*
bower jquery#* resolve git://github.com/jquery/jquery.git#*
bower jquery#* download https://github.com/jquery/jquery/archive/2.1.4.tar.gz
bower jquery#* extract archive.tar.gz
bower jquery#* resolved git://github.com/jquery/jquery.git#2.1.4
➜ bower-test bower install jquery --config.registry=https://
➜ bower-test cat bower_components/
➜ bower-test cat .bowerrc
{
"registry": "http://repo.fanatics.corp/artifactory/api/bower/bower-dev-repo",
"resolvers": [
"bower-art-resolver"
]
}
➜ bower-test bower install jquery-ui --config.registry=http://repo.fanatics.corp/artifactory/api/bower/bower-dev-repo
bower jquery-ui#* not-cached git://github.com/components/jqueryui.git#*
bower jquery-ui#* resolve git://github.com/components/jqueryui.git#*
bower jquery-ui#* download https://github.com/components/jqueryui/archive/1.11.4.tar.gz
bower jquery-ui#* extract archive.tar.gz
bower jquery-ui#* resolved git://github.com/components/jqueryui.git#1.11.4
bower jquery-ui#~1.11.4 install jquery-ui#1.11.4
jquery-ui#1.11.4 bower_components/jquery-ui
└── jquery#2.1.4
@sheeley , in order for us to find the root cause of this issue, please send an e-mail to support@jfrog.com to get our Support Team involved (I have already notified them about this). If needed, we will go online with you and troubleshoot the issue.
Hello. Do you have an answer for this problem as I think I am facing the same issue?
After doing some debugging, the JFrog folks suggested that it is fixed in the 3.7.0 version of Artifactory - we are running 3.6.x.
Correct. And thanks again @sheeley for working with us to pinpoint the issue. Version 3.7.0 should have this issue resolved, but we do recommend upgrading to the latest version, where the Bower repository configuration became much simpler and intuitive.
Thank you all for looking at it with me. :)
I'm trying to set up an install using bower-art-resolver, and not having luck. Our repos appear to be set up correctly according to the instructions, but it is still trying to hit github.com rather than our internal virtual repo (
bower-dev-repo
).Here's my setup:
✗ cat .bowerrc
✗ cat bower.json
✗ node_modules/bower/bin/bower -v
✗ cat node_modules/bower-art-resolver/package.json
✗ node_modules/bower/bin/bower -V install
Any suggestions?