1

I try to use Nexus Repository Manager 3 for a complete offline build of a classical web project. I successfully configured and used Nexus for maven repositories, and for npm too.

I still have an issue with bower: it tries to connect to git server for get-size.

$ bower install
...
bower get-size#>=1.1.4 <2.0                        not-cached git://github.com/desandro/get-size.git#>=1.1.4 <2.0
bower get-size#>=1.1.4 <2.0                           resolve git://github.com/desandro/get-size.git#>=1.1.4 <2.0
bower outlayer#>=1.1.2 <2.0                        not-cached nexus+http://nexus-server/repository/bower-all/outlayer#>=1.1.2 <2.0
bower outlayer#>=1.1.2 <2.0                           resolve nexus+http://nexus-server/repository/bower-all/outlayer#>=1.1.2 <2.0
bower outlayer#>=1.1.2 <2.0                          resolved nexus+http://nexus-server/repository/bower-all/outlayer#v1.4.2
...
bower get-size#~1.2.2                              not-cached nexus+http://nexus-server/repository/bower-all/get-size#~1.2.2
bower get-size#~1.2.2                                 resolve nexus+http://nexus-server/repository/bower-all/get-size#~1.2.2
...
bower get-size#>=1.1.4 <2.0                           ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/desandro/get-size.git", exit code of #128 fatal: unable to access 'https://github.com/desandro/get-size.git/': Failed to connect to github.com port 443: Connection timed out

I really don't get why "get-size#~1.2.2" seems to be correctly retrieved from the nexus-server, but "get-size#>=1.1.4 <2.0" still uses a git repository? Is it a hard coded dependency somewhere in another package?

2 Answers2

0

This is behaviour is inherent to the way bower works. There are not binaries. It basically just links out to git repositories and retrieves files from there .

The only thing to avoid this is to redirect the git repo links to your own internal git mirrors of the respective repositories. This might be implemented in a future release of the bower support, but for now you will have to set that up within your own infrastructure with URL rewrites, your own git repos and a mirroring process.

Manfred Moser
  • 29,539
  • 13
  • 92
  • 123
0

What is the exact dependency definition of your package? If it is in form of e.g. "bootstrap-sass": "twbs/bootstrap-sass#~3.3.3" then it tells bower to fetch it directly from github repository twbs, project bootstrap-saas, tag ~3.3.3. In my case changing the definition to simply "bootstrap-sass": "~3.3.3" resolved the issue.

Kamil Roman
  • 973
  • 5
  • 15
  • 30