Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower install fails to find satisfying version, although there is a matching tag on GitHub

I am having problems installing bower dependencies on a Windows installation. Installation fails for me on Windows 7 x64, with git 2.6.4.windows.1, node v5.4.1, npm 3.3.12, bower 1.7.2.

It works for a colleague on OSX (git 2.5.4, node v4.1.1, npm 2.14.4, bower 1.5.3) and for a colleague on Windows 10 (git 2.5.0.windows.1, node v4.2.2, npm 2.14.7, bower 1.3.11).

The error message I am getting basically tells mit that bower-angular-translate does not have a version tag that satisfies 2.8.1, but the GitHub repository does have a version 2.8.1.
The failing packages are angular-ui-router, angular-local-storage and angular-translate.

I tried downgrading node to 0.10.x and 4.x.x and reinstalling bower, both did not work.

If anyone has experienced the same error message behavior with bower (on windows?) and has successfully solved it, any pointers would be greatly appreciated.


The error message after running bower install:

bower angular-translate#~2.8.1    ENORESTARGET No tag found that was able to satisfy ~2.8.1

Additional error details:
No versions found in git://github.com/PascalPrecht/bower-angular-translate.git

My bower.json:

{
    "name": "My App Name",
    "version": "0.0.1",
    "dependencies": {
        "angular": "1.4.7",
        "angular-animate": "1.4.7",
        "angular-aria": "1.4.7",
        "angular-cookies": "1.4.7",
        "angular-resource": "1.4.7",
        "angular-sanitize": "1.4.7",
        "angular-material": "0.11.2",
        "angular-ui-router": "0.2.5",
        "angular-local-storage": "0.2.x",
        "angular-translate": "~2.8.1"
    }
}

Just in case, my package.json:

{
	"author": "My Name",
	"name": "My App Name",
	"version": "0.0.1",
	"dependencies": {},
	"devDependencies": {
		"chai": "2.2.0",
		"gulp": "3.9.x",
		"gulp-angular-filesort": "1.1.1",
		"gulp-bower-files": "0.1.x",
		"gulp-clean": "0.2.x",
		"gulp-debug": "2.1.x",
		"gulp-concat": "2.2.x",
		"gulp-filter": "1.0.x",
		"gulp-inject": "0.4.x",
		"gulp-less": "1.2.3",
		"gulp-livereload": "1.3.x",
		"gulp-tsc": "0.10.x",
		"gulp-uglify": "1.2.x",
		"gulp-util": "2.2.x",
		"gulp-watch": "0.6.x",
		"karma-coverage": "~0.2.4",
		"karma-mocha": "~0.1.6",
		"karma-phantomjs-launcher": "^0.1.4",
		"karma-sinon-chai": "~0.2.0",
		"merge-stream": "0.1.x",
		"mocha": "~1.20.1",
		"phantomjs": "^1.9.17",
		"q": "1.0.x",
		"run-sequence": "0.3.x"
	}
}
like image 539
Leon Adler Avatar asked Jan 19 '16 10:01

Leon Adler


2 Answers

GitHub revoked my SSH keys, causing git clone to fail.

Since cloning repositories via git clone --branch <tagname> https://<repo> at the "missing" tag worked, I understood from the error message that bower was not able to find the tag.

Both my bash from msys-git and my cmd.exe were set up to use Putty's plink.exe, while bower was trying to connect via OpenSSH. Putty was set up with the correct private key, OpenSSH was not.

The culprit here was GitHub, which removed my SSH public key from my profile, making git clone via SSH (which is the default for bower install) fail with a Permission denied (publickey).

All your SSH keys are belong to us

The combination of GitHub not sending me a notification email about this and the bower error message describing an entirely different error made error-tracing this a nightmare.


Kudos go to Andra for the comment to use git config --global url."https://".insteadOf git://. While not suitable as a permanent solution (my company's git server enforces SSH, since it is superior to a simple user-password combination), it helped limit the problem to the SSH access.

like image 199
Leon Adler Avatar answered Oct 27 '22 06:10

Leon Adler


Try to change the git protocol from git to https by executing:

git config --global url."https://".insteadOf git://
like image 20
haihui Avatar answered Oct 27 '22 06:10

haihui