Cloning a project doesnt respect ssh key in git config
See original GitHub issueHi,
I’m running node-red in a docker image (https://hub.docker.com/r/nodered/node-red-docker) in version 0.20.3.
I’d like to clone an existing project from my company’s gitlab repository.
I created the gitconfig (git@…repo.git syntax), created a ssh key through node-red’s ui, added the public key to my gitlab repo).
If I press “Clone Repository” the message
Authentication failed
is shown.
docker logs mynodered shows this
31 Mar 12:16:38 - [trace] git["clone","git@SECRET:SECRET/dudu.git","."]
31 Mar 12:16:38 - [debug] git -c credential.helper= clone git@SECRET:SECRET/dudu.git .
31 Mar 12:16:38 - [debug] [err] Cloning into '.'...
31 Mar 12:16:38 - [debug] [err] Permission denied, please try again.
31 Mar 12:16:38 - [debug] [err] Permission denied, please try again.
31 Mar 12:16:38 - [debug] [err] Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
31 Mar 12:16:38 - [debug] [err] fatal: Could not read from remote repository.
31 Mar 12:16:38 - [debug] [err]
31 Mar 12:16:38 - [debug] [err] Please make sure you have the correct access rights
31 Mar 12:16:38 - [debug] [err] and the repository exists.
31 Mar 12:16:38 - [debug] rc=128
If I put the following code in my Dockerfile:
FROM nodered/node-red-docker
ARG HTTP_PROXY
RUN npm config set https-proxy $HTTP_PROXY
RUN npm install node-red-dashboard
RUN npm install node-red-admin
RUN npm install node-red-contrib-gitlab
ENV GIT_SSL_NO_VERIFY=true
COPY settings.js node_modules/node-red/settings.js
RUN mkdir ~/.ssh
RUN ssh-keyscan code.rsint.net >> ~/.ssh/known_hosts
ENV GIT_SSH_COMMAND="ssh -i /data/projects/.sshkeys/admin_node-red"
(especially the last line) the clone process works.
It seems as if node-red’s cloning procedure does ignore the ssh keys which are defined in the ui.
Best regards,
Josef
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Why doesn't my SSH key work for connecting to github?
16 Answers 16 · First, double check that your git ssh connection is working: ssh -T git@github.com · If the remotes indicate https...
Read more >I can't clone a repository via SSH Permission denied
Hi! As you can see from the title, I am not able to clone a repository via SSH with command: git clone git@192.168....
Read more >Git clone fails when cloning via SSH - Atlassian Documentation
Git clones fail when using ssh even if an Access key has been added to the repository or an SSH key has been...
Read more >git clone - fail instead of prompting for credentials - Server Fault
git clone https://github.com/some/non-existing-repo will prompt for username & ... next env var doesn't help... export GIT_SSH_COMMAND='ssh -oBatchMode=yes' ...
Read more >Generate and Add SSH Keys | Pantheon Docs
Understand how to generate SSH keys to configure Git, SFTP, or Drupal ... Pantheon does not provide access to a shell environment over...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Please retry with the 0.20.5 release that has now been published.
Excellent - thanks for verifying.