Hi Nick, the ./data folder is empty when I first start at number 5. Here is the log
λ npm start
> email@example.com start C:\src\nr-vtest
> node node_modules/node-red/red.js --userDir ./data
Running in undefined mode
3 Feb 22:26:03 - [info]
Welcome to Node-RED
3 Feb 22:26:03 - [info] Node-RED version: v0.20.0-beta.4
3 Feb 22:26:03 - [info] Node.js version: v8.12.0
3 Feb 22:26:03 - [info] Windows_NT 10.0.17763 x64 LE
3 Feb 22:26:04 - [info] Loading palette nodes
3 Feb 22:26:05 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
3 Feb 22:26:06 - [info] Settings file : \Users\julia\.node-red\settings.js
3 Feb 22:26:06 - [info] HTTP Static : C:\src\nr-vtest\public
3 Feb 22:26:06 - [info] Context store : 'default' [module=memory]
3 Feb 22:26:06 - [info] User directory : C:\src\nr-vtest\data
3 Feb 22:26:06 - [warn] No active project : using default flows file
3 Feb 22:26:06 - [info] Flows file : C:\src\nr-vtest\data\flows_DESKTOP-M1M6R28.json
3 Feb 22:26:06 - [info] Creating new flow file
3 Feb 22:26:06 - [warn]
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
3 Feb 22:26:06 - [info] Server now running at http://127.0.0.1:1880/red/
3 Feb 22:26:06 - [info] Starting flows
3 Feb 22:26:06 - [info] Started flows
Haha! I can see now that it has picked up the settings.js file from the default userDir location at ~/.node-red. That explains another issue that I was seeing with uibuilder which was using the uibuilder settings from that file. I hadn't noticed that previously.
I assume that it should have created a new settings.js file by copying the master from the location I was running from. Note that I don't have a copy of node-red installed globally but I do have a ~/.node-red folder - bit of an edge-case I'll admit.
Here is the file/folder structure after the first run of Node-RED (before any custom nodes installed or any flows created):
Log from Win 10 device running NR beta2, node V10.12.0, NPM V6.4.1 ...
4 Feb 13:59:03 - [debug] git -c credential.helper= push -u origin HEAD:master --porcelain
4 Feb 13:59:05 - [debug] [err] bash: /dev/tty: No such device or address
4 Feb 13:59:05 - [debug] [err] error: failed to execute prompt script (exit code 1)
4 Feb 13:59:05 - [debug] [err] fatal: could not read Username for 'http://xxxxxxxxx': No error
4 Feb 13:59:05 - [debug] rc=128
git is in path (accessible from any dir)
bash is in path (accessible from any dir)
git is accessible from in bash also.
So far, from multiple machines, multiple node & NR version, different git installs, I have never gotten this to work unfortunately.
Hi, just to add to your heads up. I tried to activate a remote git today (just to contribute with your investigation). I got the same results. I was able to push the local repository only via the command line. For whatever I try from Node-RED interface I keep being asking to enter the login information for github (I am pretty sure it was correct, as well as the SSH keys).
4 Feb 11:26:57 - [info] Node-RED version: v0.20.0-beta.3
4 Feb 11:26:57 - [info] Node.js version: v8.11.1
4 Feb 11:26:57 - [info] Windows_NT 10.0.17763 x64 LE
I doubt I'll be able to make any progress on this without direct access to a Windows 10 machine. If anyone else is so inclined to delve into the code to help figure this out, I'd be happy to give an intro on slack to the moving pieces that are supposed to make this work.
I'd expect that to work; the unix-like systems are much more consistent in behaviour in how to spawn commands and the way git's credential helper stuff works. I was already aware that Window's has some quirks in this area and I thought I was handling them - but clearly not.
I decided to record a small video to show the issue. In the movie, I leave the dev tools opened to capture any eventual errors in the browser. When I try to push the local repository to github I can see that the issue starts even before I enter the username/password. Note: The issue is not particular to Chrome. Same happens on Edge and IE.
@Andrei this is nothing to do with the browser. It is 100% related to how we pass credentials to git - it is a complicated process that involves multiple scripts and environment variables properly configured to tell git about those scripts. I can see there are github issues (some open, some closed) against other projects who do similar interactions with Git. But until I can get access to a Windows machine there's not much I can do to investigate.