NiklasRosenstein / flux-ci

Flux is your own private & lightweight CI server.
MIT License
26 stars 10 forks source link

Added possibility to generate/remove and use custom SSH keypair per each repository #60

Closed tvrzna closed 6 years ago

tvrzna commented 6 years ago

References #53

If repo has custom SSH key, it is used in views.ping_repo() and build.do_build_() methods by GIT_SSH_COMMAND, where is key defined as identity_file.

tvrzna commented 6 years ago

I think it would make more sense to have the Generate and Remove SSH Keypair buttons in the same page (Edit Repo). When there is no key associated with the repository, there would just be a "Generate SSH Keypair" button. If there is, it displays the public key (as it does currently) and below or above that the "Remove SSH Keypair" button.

I agree, the reasons I put it there is to prevent generating it on new repo (e.g. missing name, name going to be changed/drafted detail being abandoned) and the fact, that it would cause reload of page with potentionally unsaved changes on repo. First reason should be definitely resolved by hiding this on new repo detail.

edit: For my clarification, do you mean to add button "Generate SSH Keypair" as toolbar button or just as a button below "Public key" header?

tvrzna commented 6 years ago

Generate SSH Keypair button is now part of toolbar at Edit Repo page. Remove SSH Keypair button is moved below Public Key, floating on right of Save button.

These buttons are visible only for existing repository.

NiklasRosenstein commented 6 years ago

Looks good, thanks! :) It should work on Windows, it doesn't care about permissions.

NiklasRosenstein commented 6 years ago

I've moved the Generate SSH Keypair button to the same location as the Remove SSH Keypair button.