strider icon indicating copy to clipboard operation
strider copied to clipboard

Add global SSH keys for all projects

Open nstaeger opened this issue 9 years ago • 14 comments

Hi there,

I have a bunch of GitHub repositories I want Strider to deploy and test. But somehow this does not work as I hoped.

I wanted Strider to use the default SSH-keys that are in my user-folder username/.ssh/ and which work in my commandline perfectly with Git. But somehow strider does not want them. When I provide the SSH-keys directly in the project-settings, strider is able to get the repository. But leaving them blank does not work and Strider outputs the following error:

$ git clone --recursive [email protected]:url.git . -b master

Cloning into '.'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

An unexpected error occurred while executing this job. Please report at https://github.com/Strider-CD/strider/issues

Git clone failed with code 500

Error: Git clone failed with code 500
    at badCode (/Users/admin/strider/node_modules/strider-git/worker.js:88:11)
    at updateCache (/Users/admin/strider/node_modules/strider-git/worker.js:152:31)
    at /Users/admin/strider/node_modules/strider-git/lib/index.js:99:5
    at Function.<anonymous> (/Users/admin/strider/node_modules/strider-git/node_modules/gitane/index.js:161:7)
    at next (/Users/admin/strider/node_modules/step/lib/step.js:51:23)
    at ChildProcess.<anonymous> (/Users/admin/strider/node_modules/strider-git/node_modules/gitane/index.js:151:9)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)

Running the same command in the terminal works perfect.

So my question is: Am I making something wrong here? Is this a bug? Do I need to set the keys for each project by hand or is there a way to provide one SSH-key for all projects?

Best

nstaeger avatar Sep 16 '14 14:09 nstaeger

How are you adding the repository? Using Github import feature or using Manual Git?

If the former, i believe it already does a key exchange for you. If the latter, it does nothing github related.

Strider is not designed to use the home folder ssh keys.

kfatehi avatar Sep 16 '14 17:09 kfatehi

Hi,

thanks for your response. I am using the manual add function for the project. But

Strider is not designed to use the home folder ssh keys.

already answers my question and describes why this does not work...

But is there a way to add a general SSH-Key for all projects? If not you may want to think of this as a feature-request :)

Best

nstaeger avatar Sep 17 '14 07:09 nstaeger

@nstaeger i see you closed the issue -- what did you end up doing in the end?

kfatehi avatar Sep 26 '14 09:09 kfatehi

@keyvanfatehi I started adding the SSH-Keys for each project by hand. But as said before:

Is there a way to add a general SSH-Key for all projects? If not you may want to think of this as a feature-request :)

Best

nstaeger avatar Sep 26 '14 11:09 nstaeger

No there is not. Ok got it. I'm reopening because the issue still stands.

kfatehi avatar Sep 26 '14 21:09 kfatehi

+1 for that. It comes handy when you have special user and rights defined through the ssh keys for a specific user in your system.

rauno56 avatar Nov 11 '14 08:11 rauno56

When you say Strider is not designed for using the home ssh key, this only applies to initial project pull and not its dependencies, which may or may not be pointing to private repos, correct?

We've had success adding the home SSH key as an 'admin' key in bitbucket so that all private dependencies can be pulled without issue. It still uses the strider ssh key for initial git clone though, I expect.

bitwit avatar Nov 11 '14 16:11 bitwit

+1 for this feature!

kaue avatar Mar 10 '15 01:03 kaue

+1 for this one too

rimusz avatar Mar 10 '15 09:03 rimusz

Global as in to the user or for all users?

knownasilya avatar Jun 08 '15 14:06 knownasilya

@knownasilya all users please

rimusz avatar Jun 08 '15 14:06 rimusz

@knownasilya I see this one was not added to v1.7.0

rimusz avatar Aug 11 '15 14:08 rimusz

No, a few items that were planned didn't make it due to lack of man power, but it's still planned for as soon as possible.

knownasilya avatar Aug 11 '15 14:08 knownasilya

@knownasilya any plans for this one go to the next release version?

rimusz avatar Dec 12 '15 14:12 rimusz