cookiecutter-science-project icon indicating copy to clipboard operation
cookiecutter-science-project copied to clipboard

SSH key required as default - change to an option instead?

Open gmacgilchrist opened this issue 5 years ago • 5 comments

At present, building the cookie cutter repo sets the remote to be accessed via SSH public/private key pair as default (at least that is what happened for me). I wonder if this can instead be included as an option during set up, allowing the user to instead opt for password access to GitHub?

In theory it is of course easier to have the key pair set-up, but someone who is unfamiliar with this process might see it as an unnecessary complexity barrier (in the first instance at least; it obviously makes things easier further down the line) and be put off.

At least a description could be offered in the README to state that this is necessary and provide a link to the GitHub pages to do this.

gmacgilchrist avatar May 08 '20 04:05 gmacgilchrist

That is a good idea. I am not sure if the calls to the github API (e.g. to create a new repository etc), work with the https access. I would have to check that. But it would definitely be great to point this out in the docs, either way. Care to submit a PR?

jbusecke avatar May 10 '20 20:05 jbusecke

You mean for the change in the docs? Yes, can do.

gmacgilchrist avatar May 11 '20 20:05 gmacgilchrist

And to your point about the Github API, the whole process worked for me right up to the point that it tried to push the initial commit. It was able to create the repo etc. (for which I think it requested my password), but it sets the remote to be of the ...@... form, rather than https, such that the final push failed.

gmacgilchrist avatar May 11 '20 21:05 gmacgilchrist

Thanks for testing this case. Looking forward to the PR. Let me know if you need any help.

jbusecke avatar May 11 '20 23:05 jbusecke

I think the new changes in #15 should address this problem in a more general way. If you have a minute to check out that PR, I would very much appreciate it. To use the PR version of the template you can do: cookiecutter https://github.com/jbusecke/cookiecutter-science-project --checkout move_to_gha

jbusecke avatar Jan 20 '21 15:01 jbusecke