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

Hardcoded links that connect to github by SSH instead of HTTP #317

Closed
bootrider opened this issue Sep 14, 2016 · 8 comments
Closed

Hardcoded links that connect to github by SSH instead of HTTP #317

bootrider opened this issue Sep 14, 2016 · 8 comments

Comments

@bootrider
Copy link

I'm submitting a feature request

  • Library Version:
    0.19

Please tell us about your environment:

  • Operating System:
    Windows 7

  • Node Version:
    6.3.1

  • NPM Version:
    3.10.5

  • Browser:
    all

  • Language:
    all

Current behavior:
Trying to perform the command au new --here but at the end of the wizard due to security issues I got:

Installing project dependencies.
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: Cloning into bare repository 'C:\Users\XXXX\AppData\R
oaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801'...
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: ssh_exchange_identification: read: Connection reset by pee
r
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: fatal: Could not read from remote repository.
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801:
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: Please make sure you have the correct access rights
npm ERR! git clone --template=C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\_templates --mirror [email protected]:gulpjs/gulp.git C:\Users\XXXX\AppData\Roaming\npm-cache\_git-remotes\git-github-com-gulpjs-gulp-git-4-0-7c06e801: and the repository exists.

Expected/desired behavior:

  • What is the expected behavior?
    it would be nice to have an option to use http connection to github.com not only the SSH connection
  • What is the motivation / use case for changing the behavior?
    some companies have its development teams behind firewalls and security policies, and are not able to proceed to use this tool

the links to the packages are hardcoded in aurelia-cli\package.json

Line 59: "url": "https://github.com/aurelia/cli/issues"
Line 100: "url": "git+https://github.com/aurelia/cli.git"

Also after the wizard has finished, the gulp dependency in the package.json file states:

gulp": "github:gulpjs/gulp#4.0",

@EisenbergEffect
Copy link
Contributor

I don't think the problem is the package.json urls. Those shouldn't affect the install. However, the Gulp 4 dependency is probably the culprit. I'm not sure how to fix this because it is NPM that handles the module installation. All the CLI does is run npm install.

@EisenbergEffect
Copy link
Contributor

If you know a way to make npm change the way it is working, then please let us know.

@AStoker
Copy link
Contributor

AStoker commented Sep 28, 2016

I believe there are two questions on SO that deal with a similar issue:
npm-update-error-fails-to-execute-git
is-possible-to-change-in-aurelia-the-way-that-aurelia-cli-connects-to-github
It seems that most of these problems are coming up from under workplace networks where certain ports and protocols are blocked.

Not sure if it'll solve this issue, but give this a try.
Try configuring your git to use https instead of git. That seems to work more frequently inside work networks. Type this command into your console:
git config --global url."https://".insteadOf git://

Additionally, if that doesn't work, you might need to further specify when npm is using git with ssh. In this case, run this command as well:
git config --global url."https://github.com/".insteadOf [email protected]:

@bootrider
Copy link
Author

As I already state in SO that solution does not work. NPM will always try to connect to GIT using HTTPS.

changing the configuration of GIT allow to download the repo using the GIT command, but NPM source code has hardcoded the protocols to use when a connection to GIT is required.

@AStoker
Copy link
Contributor

AStoker commented Sep 28, 2016

Sorry, didn't realize that was you :) I mentioned that solution because that is what had worked for our office when we had the exact same error.

@Alexander-Taran
Copy link
Contributor

stale since 2016

@zewa666 zewa666 changed the title Hardcoded links that connect to github by SSH insted of HTTP Hardcoded links that connect to github by SSH instead of HTTP Mar 2, 2018
@Alexander-Taran
Copy link
Contributor

Maybe can be closed

@EisenbergEffect
Copy link
Contributor

Closing this since it's an old issue. We're also working on updating to the official gulp 4 release, which would address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants