Strider-CD / strider

Open Source Continuous Integration & Deployment Server
http://strider-cd.github.io/
4.59k stars 432 forks source link

Add global SSH keys for all projects #572

Open nstaeger opened 9 years ago

nstaeger commented 9 years ago

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 git@github.com: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

kfatehi commented 9 years ago

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.

nstaeger commented 9 years ago

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

kfatehi commented 9 years ago

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

nstaeger commented 9 years ago

@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

kfatehi commented 9 years ago

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

rauno56 commented 9 years ago

+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.

bitwit commented 9 years ago

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.

kaue commented 9 years ago

+1 for this feature!

rimusz commented 9 years ago

+1 for this one too

knownasilya commented 9 years ago

Global as in to the user or for all users?

rimusz commented 9 years ago

@knownasilya all users please

rimusz commented 9 years ago

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

knownasilya commented 9 years ago

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.

rimusz commented 8 years ago

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