bower / bower

A package manager for the web
bower.io
MIT License
14.99k stars 1.85k forks source link

Either bower or GitHub is broken? #2539

Closed Dor1s closed 4 years ago

Dor1s commented 4 years ago

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

$ bower -v && npm -v && node -v
1.8.8
2.15.9
v4.5.0

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

Nope

Steps to reproduce the issue:

1.

$ cat bower.json 
{
  "name": "asd",
  "dependencies": {
    "iron-ajax": "PolymerElements/iron-ajax^2.0.0"
  },
  "resolutions": {
    "iron-ajax": "^2.0.0"
  }
}

2.

$ bower install
bower iron-ajax#*           not-cached https://github.com/PolymerElements/iron-ajax^2.0.0.git#*
bower iron-ajax#*              resolve https://github.com/PolymerElements/iron-ajax^2.0.0.git#*
bower iron-ajax#*              ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/PolymerElements/iron-ajax^2.0.0.git", exit code of #128 fatal: unable to access 'https://github.com/PolymerElements/iron-ajax^2.0.0.git/': The requested URL returned error: 400

Additional error details:
fatal: unable to access 'https://github.com/PolymerElements/iron-ajax^2.0.0.git/': The requested URL returned error: 400

Describe the results you received:

This used to work, I believe, but fails when tries to access GitHub.

Describe the results you expected:

No errors.

Additional information:

I've tried manually requesting that URL and got the following:

$ curl -i https://github.com/PolymerElements/paper-icon-button^2.0.0.git/
HTTP/1.1 301 Moved Permanently
Date: Thu, 11 Jul 2019 19:55:41 GMT
Content-Type: text/html
Content-Length: 178
Server: GitHub.com
Location: https://github.com/PolymerElements/paper-icon-button^2.0.0/
Vary: Accept-Encoding
X-Frame-Options: DENY
Vary: Accept-Encoding
X-GitHub-Request-Id: EE63:12AF:1DB9E8:324FDA:5D27943D

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

$ curl -i https://github.com/PolymerElements/paper-icon-button^2.0.0/
HTTP/1.1 404 Not Found
Date: Thu, 11 Jul 2019 19:56:06 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Server: GitHub.com
Status: 404 Not Found
Vary: X-PJAX
Cache-Control: no-cache
Set-Cookie: has_recent_activity=1; path=/; expires=Thu, 11 Jul 2019 20:56:06 -0000
Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Mon, 11 Jul 2039 19:56:06 -0000; secure; HttpOnly
Set-Cookie: _gh_sess=K3g2SzhtajVaQjhYMDFzbXhsSWIxTXJJdTdHcUN0WFJVMWhmbElIcXVRSXZBRVk5THRPeHp0RnZqUFplb2hqTjl3NlVMcFR1d0diY1JUT0FkdVArL09UcGlMZ1oxRVBHMWFqS0Zwd1ZOSlNkaXJjMDMyRzZ4Wlc4VkZZMHpqeFYtLU9MbjdDcWNHNDBINmxqK2hvUXAwNXc9PQ%3D%3D--802b5fbb2bab80910ce3778a33e0ead83a75b04b; path=/; secure; HttpOnly
X-Request-Id: f3ec3067-59c9-4197-a2ac-940777a5eaaa
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Frame-Options: deny
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Expect-CT: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors"
Content-Security-Policy: default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline'
X-GitHub-Request-Id: A711:6F95:2E4CF1:4F63B0:5D279456

Not Found

That's why I suspect either bower uses a wrong URL or GitHub returns 404 when it shouldn't.

sheerun commented 4 years ago

It should be PolymerElements/iron-ajax#^2.0.0, not PolymerElements/iron-ajax^2.0.0

Dor1s commented 3 years ago

Thanks!