Open diarmidmackenzie opened 1 year ago
If I run the problematic command directly, it asks for the passphrase for my SSH key, and then seems to work successfully.
C:\Users\ASUS\Documents\GitHub\Test\test-physics-2>git --no-replace-objects ls-remote ssh://git@github.com/ngokevin/debug.git
Enter passphrase for key '/c/Users/ASUS/.ssh/id_ed25519':
9742c5f383a6f8046241920156236ade8ec30d53 HEAD
9742c5f383a6f8046241920156236ade8ec30d53 refs/heads/master
ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a refs/heads/noTimestamp
fc068941f030373f51aac24d3fd9ce4760aba300 refs/heads/v3
497a088b5f7a48a0c2ef10c8bd5aaf06e0f9d129 refs/tags/0.1.0
207be096d3fb98580ff074fc5fab13633905120c refs/tags/0.2.0
b07efa967cccfe7cb52b14471c5e2994ac65e27b refs/tags/0.3.0
a73176b16872ac4b7f904d23ed88b02a8ec17fa2 refs/tags/0.4.0
etc...
npm install aframe
works for me. I'm on npm 8.15.0, node v16.17.1, Pop OS (linux>debian>ubuntu>pop).
It works on Ubuntu 22.04 node v16.18.0 npm 8.19.2 with my ssh rsa key without passphrase.
not sure what's special about that configuration. anything that should be done on A-Frame side?
It sounds like an npm problem, but it is weird. I wonder if it was a temporary github server blip? Did you experience the failure multiple times, diarmid? Does it reproduce if you do it again in a clean directory?
Can i close this or there's something we need on A-Frame side?
This is not a transient thing - it is still broken for me, meaning I can't do aything with npm + a-frame at the moment.
Something that potentially would help would be migrating all the dependencies in package.json to reference NPM packages rather than GitHub URLs.
https://docs.npmjs.com/cli/v8/configuring-npm/package-json#github-urls
This, for instance "debug": "ngokevin/debug#noTimestamp",
This would require all the dependencies being published to npm:
"debug": "ngokevin/debug#noTimestamp",
"three-bmfont-text": "dmarcos/three-bmfont-text#21d017046216e318362c48abd1a48bddfb6e0733",
"markserv": "github:sukima/markserv#feature/fix-broken-websoketio-link",
"too-wordy": "ngokevin/too-wordy",
Having a single mechanism for installing everything would definitely reduce surface area in terms of things that can go wrong.
OK - finally got round to trying Vincent's suggestion of using SSH keys without a passphrase, and I have now progressed to a new error:
C:\Users\ASUS\Documents\GitHub\Test\test-physics-2>npm install aframe
npm ERR! code 1
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects clone -b noTimestamp ssh://git@github.com/ngokevin/debug.git C:\Users\ASUS\AppData\Local\npm-cache\_cacache\tmp\git-cloneCXperv --recurse-submodules --depth=1 --config core.longpaths=true
npm ERR! Cloning into 'C:\Users\ASUS\AppData\Local\npm-cache\_cacache\tmp\git-cloneCXperv'...
npm ERR! git: 'submodule' is not a git command. See 'git --help'.
If I run this command by itself, it is successful...
git --no-replace-objects clone -b noTimestamp ssh://git@github.com/ngokevin/debug.git C:\Users\ASUS\AppData\Local\npm-cache\_cacache\tmp\git-cloneCXperv --recurse-submodules --depth=1 --config core.longpaths=true
A different issue, but so that you are aware, it seems that the "github:" prefix may be an issue for some people, Someone reported he couldn't install networked-aframe because of this, he was using ubuntu and node 14 but I don't know how he installed node. I didn't have the issue myself on ubuntu 22.04 and node 16. Using the other github syntax fixed the issue for him, see https://github.com/networked-aframe/networked-aframe/pull/375 for details.
Probably not the same git binary that is executed with npm? I know you had an issue also with husky and bash last time.
OK, I have "solved" this by:
Adding this to my .gitconfig
[url "https://"]
insteadOf = git://
insteadOf = ssh://
And adding this to my path (to deal with an error git: 'remote-https' is not a git command
)
C:\Program Files\Git\mingw64\libexec\git-core
(as per this comment https://github.com/desktop/desktop/issues/10345#issuecomment-1005483477 )
It looks like the path update to include "C:\Program Files\Git\mingw64\libexec\git-core" was the critical bit.
Things are now working without this line in .gitconfig
insteadOf = ssh://
I haven't gone back and tested all combination, but it looks like there's 2 different routes I could have taken to get this working:
a) Add this to .gitconfig
[url "https://"]
insteadOf = git://
insteadOf = ssh://
b) Extend path to include "C:\Program Files\Git\mingw64\libexec\git-core"
a) No changes to .gitconfig
b) Create SSH keys locally, without a passphrase and add them to my GitHub account, as per instructions here
(if I'd been able to get ssh-agent working, maybe I could have used a passphrase)
c) Extend path to include "C:\Program Files\Git\mingw64\libexec\git-core"
In terms of what's needed for A-Frame, I'd say there's nothing essential, as it seems there are ways to muddle through issues that may arise.
But the overall installation would be less vulnerable to problems if it was standardized on a single method of package download, so it would be desirable to move to a position where all dependencies are npm packages, and downloaded from npm.
I think it's also desirable for dependencies like ngokevin/debug to be brought under the A-Frame umbrella, rather than being left to be maintained (or not) by someone no longer associated with A-Frame.
Description:
I found these issues, which seem similar:
4329
5057
Tried adding this to my .gitconfig as per #5057
But this hasn't helped. I get the same error.
I'll upload verbose output from the command (with that change to
.gitconfig
applied)2022-11-04T16_26_54_020Z-debug-0.log