Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating ssh key on Windows #827

Closed
odow opened this issue Sep 6, 2018 · 2 comments
Closed

Generating ssh key on Windows #827

odow opened this issue Sep 6, 2018 · 2 comments

Comments

@odow
Copy link
Collaborator

odow commented Sep 6, 2018

I just spent the last wee while bashing my head against this. I had done it a while ago and didn't think to write it down because it seemed obvious. When I went to do it again it wasn't so obvious.

I'm busy this afternoon but I will try to add a section to the docs going through this when I get the chance.

Here are the steps I took:

Generate a key

  1. Open PuTTY Key Generator. (Download link.)
    image
  2. Click Generate, and follow the instructions, moving the mouse around to create randomness.

Add the public key to Github

  1. To go https://github.com/[YOUR_USER_NAME]/[YOUR_REPO_NAME]/settings/keys and click Add deploy key
    image
  2. Make the title documenter
  3. Copy and paste the highlighted text from PuTTY beginning with ssh-rsa into the key
    image
  4. Click allow write access
  5. Click Add key

Add the private key to travis

  1. Go back to the PuTTY Key Generator. Under the Conversions tab, click Export OpenSSH key. Click through the prompt that says you are saving without a password (Travis needs a key with no passphrase). Save that key somewhere.
    image
  2. Run Julia> Documenter.base64encode(readstring(“path/to/the/private/key”))
  3. Open https://travis-ci.org/[YOUR_USER_NAME]/[YOUR_REPO_NAME]/settings
    image
  4. Under the Environment Variables heading, add an environment variable. The name should be DOCUMENTER_KEY and the value should be the output of the Julia command from step 9 (make sure to remove the surrounding quotes).
  5. Check that the “Display value in build log” is switched off and then click Add.
@mortenpi
Copy link
Member

mortenpi commented Sep 6, 2018

Ideally DocumenterTools.Travis.genkeys would just work on Windows, but there will always probably be setups where it does not. Having a walkthrough like this would be handy! A subpage of Hosting Documentation perhaps?

Do you think it would make sense to split it up a bit? There are things that are platform-independent (adding keys to GitHub/Travis), and might also be useful for non-Windows users.

There is also a snippet you can use as long as you have ssh-keygen available: #761 (comment) Might be good to have that as well as one of the alternatives.

@odow
Copy link
Collaborator Author

odow commented Sep 6, 2018

That all sounds good.

The only platform dependent bit is generating the key. The bit that stumped me is needing to export the private key rather than just clicking the obvious save private key button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants