opened
wintercounter
username_0
### pnpm version: all

### Code to reproduce the issue:
Add a custom git url as package.
```
"my-custom-package": "git+ssh://git@mygit.site/package.git#v0.1.7",
```
### Expected behavior:
Resolves package
### Actual behavior:
Does not resolve package.
Cannot resolve external git packages
issue
created
zkochan
username_1
@username_0 could you please recheck with latest pnpm. This might have been fixed by #717. If not, add the error stack trace that will be at the end of the `pnpm-debug.log` file
comment
created
FalloutPL
username_2
$ pnpm -v
0.65.4

Not fixed:

URL from our gitlab: ```git@site:project/repo.git```
package: ```"git+ssh://git@site:project/repo.git#master"```
```
   err: 
      name: "Error"
      message: "Command failed: git ls-remote --refs ssh://git@git.pf.com.pl/:eniro-crm/ecrm-fakerjs.git master\nGitLab: The project you were looking for could not be found.\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"
      code: 128
   ```

it changes url to:

```ssh://git@site/:project/repo.git```

than 

```ssh://git@site/project/repo.git```

so

there is unwanted ```:``` in parsed url
comment
created
wintercounter
username_0
Strange, for me it fixes.
comment
created
zkochan
username_1
@username_2 uses some different format. I'll look into that one later
comment
created
aaronfrost
username_3
I have the same issue as well. It looks like when you are using an organization, that may be the problem. Also have the same issue as @username_2. Here is a screenshot of my pnpm error log
![image](https://cloud.githubusercontent.com/assets/662832/25963011/14fbdfd6-363d-11e7-9c17-8616844f76ef.png)

I am not depending on pnpm yet. But sounds way fast. I would love it.
comment
created
aaronfrost
username_3
To add some additional info... my package.json has several other git urls in it. This is the only one that it fails on. So... this tells me that it DOES work with some git urls, but not others. And as I looked at all of the git urls, that was the one difference... that this one uses a `:` before the organization name, where the others don't. So, I think it must be around that specific usage.
comment
created
aaronfrost
username_3
I noticed that some of our other internal git urls in the `package.json` were formatted with the `/` before the org name instead of the `:`. So I changed this one, and tried `pnpm i` again, and it worked. So... 

- Those who have this same issue, true that. 
- For those who can fix this, it seems to be around that specifically. 

❤️ thanks for building this. It's pretty awesome!
comment
created
moos
username_4
Likewise with @username_2.   Similar to [yarn#513](https://github.com/yarnpkg/yarn/issues/513).  We also have multiple dependencies that use the git:ssh...:user/repo format.  Bummer!
```bash
$ pnpm -v
0.68.0
```
comment
created
zkochan
username_1
I won't have time to fix it in the near future (maybe in two weeks I can look into it but cannot guarantee).

If someone has time, I think the fix will have to go to https://github.com/pnpm/pnpm/blob/master/src/resolve/git.ts

Also, I think this issue is a regression. I think it used to work till we updated [npm-package-arg](https://www.npmjs.com/package/npm-package-arg) to version 5. So `pnpm@0.46.6` and earlier versions of pnpm might not have this issue.
comment
created
moos
username_4
I can take a look -- can you point me to the appropriate test file?
comment
created
zkochan
username_1
Here: https://github.com/pnpm/pnpm/blob/master/test/install/fromRepo.ts
comment
created
moos
username_4
Indeed, it's coming from npm-package-arg.  I've opened [#22](https://github.com/npm/npm-package-arg/issues/22) on them.  Incidentally, it seems to happen only for non-github.com hosted repos.

A quick hack would be to use `saveSpec` rather than `fetchSpec` in fromRepo.ts and strip the initial 'git+'.  Let's hope that's not necessary if they response quickly.
comment
created
zkochan
username_1
Seems like this was an issue in npm5 as well and they have fixed it [here](https://github.com/npm/npm-package-arg/commit/b0c02c7383cc1455827c6f364a5c75d387c2654b)

You can try `pnpm@next` to see if the issue is gone. If so, I can also update the latest version of pnpm.
comment
created
zkochan
username_1
@username_4 could you check whether this is fixed in the current latest [pnpm@0.69.1](https://github.com/pnpm/pnpm/releases/tag/v0.69.1)
comment
created
zkochan
username_1
Great!
comment
closed
zkochan
username_1
issue