Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.1.8.0 gives error on install via Git: "ENOTFOUND Package git not found" #2392

Closed
liquid1982 opened this issue Nov 14, 2016 · 13 comments
Closed
Assignees

Comments

@liquid1982
Copy link

liquid1982 commented Nov 14, 2016

I'm receiving the following error when I try to install packages via Git (git@...).

vincenzo:~/ $ bower install git@github.com:stevemao/left-pad.git                                                                                                      
bower                        ENOTFOUND Package git not found

Everything works fine using https:

vincenzo:~/ $ bower install https://github.com/stevemao/left-pad.git                                                                                                  
bower left-pad#*            not-cached https://github.com/stevemao/left-pad.git#*
bower left-pad#*               resolve https://github.com/stevemao/left-pad.git#*
bower left-pad#*              download https://github.com/stevemao/left-pad/archive/v1.1.3.tar.gz
bower left-pad#*               extract archive.tar.gz
bower left-pad#*              resolved https://github.com/stevemao/left-pad.git#1.1.3
bower left-pad#^1.1.3          install left-pad#1.1.3

left-pad#1.1.3 bower_components/left-pad

Something changed in the 1.8.0 version, but I wasn't able to understand if the former version is now deprecated.

Output of bower -v && npm -v && node -v:

1.8.0
2.14.7
v4.2.1

Additional environment details (proxy, private registry, etc.):

N/A

Steps to reproduce the issue:

  1. run bower install git@github.com:stevemao/left-pad.git on v. 1.8.0
  2. PANIC
@liquid1982
Copy link
Author

This issue could be related:

#2391

@bglick
Copy link

bglick commented Nov 15, 2016

I can confirm that rolling back to 1.7.9 makes the problem go away

[master]:~/dev/vendor_portal: sudo npm install -g bower
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
bower@1.8.0 /usr/lib/node_modules/bower
[master]:~/dev/vendor_portal: bower install git@github.com:Vandegrift/chain_common.git
bower                        ENOTFOUND Package git not found
[master]:~/dev/vendor_portal: sudo npm uninstall -g bower
unbuild bower@1.8.0
[master]:~/dev/vendor_portal: sudo npm install -g bower@1.7.9
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
bower@1.7.9 /usr/lib/node_modules/bower
[master]:~/dev/vendor_portal: bower install git@github.com:Vandegrift/chain_common.git
bower chain_common#*            cached git@github.com:Vandegrift/chain_common.git#1.0.13
bower chain_common#*          validate 1.0.13 against git@github.com:Vandegrift/chain_common.git#*
bower chain_common#*               new version for git@github.com:Vandegrift/chain_common.git#*
bower chain_common#*           resolve git@github.com:Vandegrift/chain_common.git#*
bower chain_common#*          checkout 1.0.14
bower chain_common#*          resolved git@github.com:Vandegrift/chain_common.git#1.0.14
bower chain_common#^1.0.14     install chain_common#1.0.14

chain_common#1.0.14 bower_components/chain_common
├── angular#1.4.14
├── angular-bootstrap#2.2.0
├── angular-mocks#1.4.14
├── angular-moment#1.0.0
├── angular-ui-router#0.3.1
├── bootstrap-css#3.3.6
└── jquery#1.11.3

@boromisp
Copy link

Could this be because of #2322, more specifically 1eabaef?
And what about this: dc59913?

I'm not familiar with the source, just browsed through the recent commits, so I could be on the wrong track.

@doomedramen
Copy link
Member

I didn't know you could use git@github style URLs on bower, I thought you could only use the short form bower install username/package from github. I'll put a patch in.

@boromisp
Copy link

We use this URL style for private git repos with ssh key auth.

@doomedramen
Copy link
Member

doomedramen commented Nov 22, 2016

I cannot see any tests currently in place for supporting git@github.com:USERNAME/PACKAGE.git style URLS, unless any core devs have an issue with it I will add tests and fixes for them. @sheerun

@doomedramen doomedramen self-assigned this Nov 22, 2016
@liquid1982
Copy link
Author

@wookoouk no worries, it happens :) you can find that URL style in the docs, with other styles as well: https://bower.io/docs/api/#install

@doomedramen
Copy link
Member

My solution to this is to get the last @ after the last '/' (if any) and only replace that with a '#' instead of replacing all @'s. (damm regex)

@doomedramen
Copy link
Member

doomedramen commented Nov 22, 2016

PR #2395

@alber70g
Copy link

alber70g commented Feb 9, 2018

Related issue occurs with 1.8.2 when installing from a private repo.

Command: bower i -S "ssh://git@gitlab.xyz.net:2222/Teamname/reponame.git"

Error: ENOTFOUND Package ssh://git not found

@bennypowers
Copy link

We had this problem with a gitlab private repo, and our solution was to enable access to the deploy key for that private repo. YMMV

@isolationism
Copy link

I was having this problem with Bower 1.8.2 as well. Updating to Bower 1.8.4 resolved the problem.

@benmann
Copy link
Member

benmann commented Mar 31, 2018

Fixed by #2395

@benmann benmann closed this as completed Mar 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants