Error when updating (error fatal: Could not read from remote repository.)

Anyone have any ideas on this?

2101 timing idealTree:node_modules/n8n/node_modules/xss/node_modules/commander Completed in 0ms
2102 timing idealTree:buildDeps Completed in 6914ms
2103 timing idealTree:fixDepFlags Completed in 48ms
2104 timing idealTree Completed in 9654ms
2105 timing command:update Completed in 9692ms
2106 verbose stack Error: An unknown git error occurred
2106 verbose stack     at makeError (/usr/local/lib/node_modules/npm/node_modules/@npmcli/git/lib/make-error.js:28:13)
2106 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/@npmcli/git/lib/spawn.js:37:26
2106 verbose stack     at processTicksAndRejections (node:internal/process/task_queues:96:5)
2107 verbose cwd /home/ubuntu
2108 verbose Linux 5.16.4-051604-generic
2109 verbose node v16.13.0
2110 verbose npm  v8.7.0
2111 error code 128
2112 error An unknown git error occurred
2113 error command git --no-replace-objects ls-remote ssh://[email protected]/n8n-io/tmpl.git
2114 error [email protected]: Permission denied (publickey).
2114 error fatal: Could not read from remote repository.
2114 error
2114 error Please make sure you have the correct access rights
2114 error and the repository exists.
2115 verbose exit 128
2116 timing npm Completed in 9822ms
2117 verbose unfinished npm timer reify 1656040726174
2118 verbose unfinished npm timer reify:loadTrees 1656040726207
2119 verbose code 128
2120 error A complete log of this run can be found in:
2120 error     /root/.npm/_logs/2022-06-24T03_18_46_045Z-debug-0.log

Hi @wgicio, I am sorry to hear you’re having trouble here.

Can you confirm which command exactly you were running when running into this permissions problem?

npm update -g n8n

Hm, that’s odd - just gave this a go on my side without problems:

Also, the GitHub - n8n-io/tmpl: Riot template engine repo is public, so shouldn’t really cause trouble. Is there a chance this was just a temporary issue?

If not, could you try removing and re-installing n8n?

[email protected]:/home/ubuntu# npm update -g n8n
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/n8n-io/tmpl.git
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR! 
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-06-25T02_58_00_094Z-debug-0.log
[email protected]:/home/ubuntu# 

tried again today and got same error.
How will uninstalling and reinstalling affect my workflows? can I just reinstall over the top?

I was in a home directory, i switched out of it and the update worked