# Documenter.jl travis.genkeys "which which" error on Windows?

**URL:** https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881
**Category:** General Usage
**Tags:** documenter
**Created:** [September 14, 2017, 5:02am UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881 "2017-09-14T05:02:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Crghilardi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crghilardi/32/3738_2.png) [@Crghilardi](https://discourse.julialang.org/u/Crghilardi)
#### Post date: [September 14, 2017, 5:02am UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/1 "2017-09-14T05:02:21Z")

</div>

Hi all,

I am trying my best to move over to Documenter from simple .md files and I have been struggling with the (seemingly) last few steps to get it up and running. When using documenter, I cannot generate the Travis keys [as similarly mentioned in this thread](https://github.com/JuliaDocs/Documenter.jl/issues/144).

I have so far:

– pip installed mkdocs and verified cmd-\> mkdocs builds locally  
I have even used [mkdocs gh-deploy](https://discourse.julialang.org/t/deploy-documenter-docs-locally/5463/4) to get something up and working.

–I cannot find the thread again, but somewhere I found a thread that mentioned you have to download Ruby, which I did from [here](https://rubyinstaller.org/) and run gem install travis.

– I have also tried commenting out the ~4 `which blah ` statements in my downloaded, to no success.

– I am usually using Github for Desktop (the GUI), which comes with a GitShell utility. I wasn’t sure if that was different than pure Git, so I also installed just Git. Although I can do GitShell → ssh- genkey which generates files fine

I’ve probably seen other pertinent threads on documenter but all the my links are purple right now so I can’t tell anything apart.

So I guess my question is: is this some windows issue or just something else and how do I get around it? I have never heard of `which`, and googling [lead me to this](https://stackoverflow.com/questions/304319/is-there-an-equivalent-of-which-on-the-windows-command-line).

Output:

```julia
julia> using Documenter
julia> Travis.genkeys("ForestBiometrics")
ERROR: could not spawn `which which`: no such file or directory (ENOENT)
Stacktrace:
 [1] _jl_spawn(::String, ::Array{String,1}, ::Ptr{Void}, ::Base.Process, ::Base.DevNullStream, ::Base.DevNullStream, ::Base.DevNullStream) at .\process.jl:360
 [2] #375 at .\process.jl:512 [inlined]
 [3] setup_stdio(::Base.##375#376{Cmd}, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at .\process.jl:499
 [4] #spawn#374(::Nullable{Base.ProcessChain}, ::Function, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at .\process.jl:511
 [5] (::Base.#kw##spawn)(::Array{Any,1}, ::Base.#spawn, ::Cmd, ::Tuple{Base.DevNullStream,Base.DevNullStream,Base.DevNullStream}) at .\<missing>:0
 [6] #genkeys#1(::String, ::Function, ::String) at C:\Users\XXX\.julia\v0.6\Documenter\src\Documenter.jl:616
 [7] genkeys(::String) at C:\Users\XXXX\.julia\v0.6\Documenter\src\Documenter.jl:616

```

---

<div class="post-metadata">

### Author: ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)
#### Post date: [September 14, 2017, 7:45am UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/2 "2017-09-14T07:45:58Z")

</div>

`Travis.genkeys` has not really been tested on Windows as far as I know, and it’s written in a way that it assumes a UNIX-y environment. To add the keys on Windows it’s probably easiest to generate the keys manually (with `ssh-keygen`) and then add the public key to GitHub and the private key as a _hidden_ environment variable called `DOCUMENTER_KEY` on Travis.

Feel free to open an issue to track this – it would be good to have either documentation on how to do this on Windows, or fix `genkeys` in a way that it would work out of the box.

---

<div class="post-metadata">

### Author: ![bramtayl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bramtayl/32/3614_2.png) [@bramtayl](https://discourse.julialang.org/u/bramtayl)
#### Post date: [September 14, 2017, 10:05pm UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/3 "2017-09-14T22:05:25Z")

</div>

Might be worth taking a look at [PackageGenerator](https://github.com/bramtayl/PackageGenerator.jl). Only modification needed for windows would be giving the path to ssh-keygen (which is packaged with git).

---

<div class="post-metadata">

### Author: ![bramtayl](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bramtayl/32/3614_2.png) [@bramtayl](https://discourse.julialang.org/u/bramtayl)
#### Post date: [September 14, 2017, 10:09pm UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/4 "2017-09-14T22:09:22Z")

</div>

Also, git packages a whole bunch of unix tools, including which, in `C:\Program Files\Git\usr\bin`. Might be worth temporarily adding to your path if you are gonna stick with Documenter

---

<div class="post-metadata">

### Author: ![Crghilardi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crghilardi/32/3738_2.png) [@Crghilardi](https://discourse.julialang.org/u/Crghilardi)
#### Post date: [September 15, 2017, 1:09am UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/5 "2017-09-15T01:09:47Z")

</div>

What the process with generating the keys manually with ssh-keygen look like?

The Gitshell command generates a file(no file suffix?) and a microsoft publisher document (both readable in a text editor). Do I just copy and paste the strings in those files to travis and github or do I have to move the files to some directory?

---

<div class="post-metadata">

### Author: ![mortenpi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mortenpi/32/158_2.png) [@mortenpi](https://discourse.julialang.org/u/mortenpi)
#### Post date: [September 17, 2017, 3:24pm UTC](https://discourse.julialang.org/t/documenter-jl-travis-genkeys-which-which-error-on-windows/5881/6 "2017-09-17T15:24:49Z")

</div>

Yup, those are the ones. Those files are both actually simple text files, so you should open them with Notepad or some other text editor. The one without an extension is the private key and `.pub` file is the public key. The contents of those files have to be copied to Travis and GitHub. See the [Documenter manual](https://juliadocs.github.io/Documenter.jl/latest/man/hosting/#SSH-Deploy-Keys-1) for details – the procedure is the same as for `Travis.genkeys` (it just runs `ssh-keygen` for you and prints out the keys).
