Permission Error - User Guide: Custom deployment

Hi, I wanted to to follow the steps from the User Guide: Custom deployment:

Follow these steps to run your custom project

  1. Prepare your environment
  2. Clone your repository from the custom-project template.
    Then initialize and update the openremote submodule with git submodule init and git submodule update --rebase --remote from your custom project directory after cloning the repo. This is easiest if you have an SSH-key in your Github account
  3. Set up your IDE. Note that Application run configurations are already prepared when using this template.
    Use docker-compose -f profile\dev-testing.yml up --build -d and run the ‘Custom Deployment’ configuration. You should have two containers running in Docker, and the manager through your IDE.
  4. Next we serve the Manager UI from the /openremote/ui/app/manager directory with npm run serve -- --env config=..\..\..\..\deployment\manager\app.

Unfortunately the command git submodule update --rebase --remote leads to the following error:

C:\Users\stockl\Documents\Git-Repositories\openremote3\custom-project>git submodule update --rebase --remote
Cloning into ‘C:/Users/stockl/Documents/Git-Repositories/openremote3/custom-project/openremote’…
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of ‘git@github.com:openremote/openremote.git’ into submodule path ‘C:/Users/stockl/Documents/Git-Repositories/openremote3/custom-project/openremote’ failed
Failed to clone ‘openremote’. Retry scheduled
Cloning into ‘C:/Users/stockl/Documents/Git-Repositories/openremote3/custom-project/openremote’…
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of ‘git@github.com:openremote/openremote.git’ into submodule path ‘C:/Users/stockl/Documents/Git-Repositories/openremote3/custom-project/openremote’ failed
Failed to clone ‘openremote’ a second time, aborting

Does someone has an idea how to solve this? I tried everything …

Hi,

Looks like you have some sort of issue with your git SSH config; our openremote repo is public so anyone call pull that code; could always try switching to the https URL or you’ll need to fix your git installation.

Hi deputy chief,

I’m having the same issue as you - did you ever solve the problem?

For me the problem was caused by Git for Windows using a different openssh executable than Windows itself. To have Git for Windows use the Windows openssh executable run you can run the following command:

git config --global core.sshCommand “‘C:\Windows\System32\OpenSSH\ssh.exe’”

More details and source of this solution found below:

I have had the same issue. The solution is changing the remote of the submodule from ssh to https. Basically, change the file .gitmodules from:

[submodule "openremote"]
    path = openremote
    url = git@github.com:openremote/openremote.git
    branch = master
    update = rebase

to

[submodule "openremote"]
    path = openremote
    url = https://github.com/openremote/openremote.git
    branch = master
    update = rebase

with the git or ssh option, your ssh key needs to be registered in the openremote organisation. Which you probably are not. Using the https option disables all ssh key checks. The result is exactly the same thing.

I’ve now changed the URL in the custom-project template to avoid users experiencing this in the future.