bower/bower — pull request #746 by tschaub (2013-08-08 19:36:42+00:00)
Title: Unable to install closure-library (or any git repo at code.google.com)

I'm trying to use Bower to grab `closure-library`. It looks like the library is registered with `git://code.google.com/p/closure-library.git`. This URL doesn't resolve to anything.

The [Closure Library page](https://code.google.com/p/closure-library/source/checkout) says to `git clone https://code.google.com/p/closure-library/`.

So I've tried this in `bower.json`:

```js
"dependencies": {
"closure-library": "https://code.google.com/p/closure-library/"
}
```

It looks like the resolver factory (understandably) decides this is a job for the `UrlResolver` and `index.html` is downloaded from the site.

When I try to force the `GitRemoteResolver` I'm getting a failure:

```js
"dependencies": {
"closure-library": "git+https://code.google.com/p/closure-library/"
}
```

```shell
bower closure-library#* not-cached https://code.google.com/p/closure-library.git#*
bower closure-library#* resolve https://code.google.com/p/closure-library.git#*
bower closure-library#* checkout master
bower closure-library#* ECMDERR Failed to execute "git clone https://code.google.com/p/closure-library.git -b master --depth 1 --progress .", exit code of #128
```

This is because the `GitRemoteResolver` [trims the slash](https://github.com/bower/bower/blob/2386d46609f1e491f0a10abea5ff2b03c9c86e25/lib/core/resolvers/GitRemoteResolver.js#L10) and ensures that there is a [trailing `.git`](https://github.com/bower/bower/blob/2386d46609f1e491f0a10abea5ff2b03c9c86e25/lib/core/resolvers/GitRemoteResolver.js#L12-L15).

Should there be a config option to preserve URLs (without stripping `/` or adding `.git`)?

I imagine this is an issue with [any code.google.com project using git](https://code.google.com/p/support/wiki/GitFAQ#Can_I_access_my_repository_over_git://_or_ssh://_instead_of_http).