-
Notifications
You must be signed in to change notification settings - Fork 686
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
Add note about setting up Github authentication with ssh #477
Conversation
✅ Build knowledge-repo 1.0.627 completed (commit 59bb8e9b2e by @srowen) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @srowen ! I've made a few suggestions here, let me know what you think!
docs/deployment.rst
Outdated
If the git repo is hosted on a remote service like Github, then the knowledge | ||
repo server will periodically fetch updates, while running as a server. If | ||
the remote service requires authentication (e.g. a private repository on Github), | ||
then these requests will fail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of the following rewording of this paragraph:
When serving the posts from this repository using the Knowledge Repo web application, it will attempt to periodically fetch upstream changes to the repository. This can be disabled in the server configuration by setting INDEXING_UPDATES_REPOSITORIES=False
, in which case you will have to create your own external process for updating the repository in order for the Knowledge Repo to see new posts. If the git repository is served on a remote host that requires authentication, the integrated fetching routines will fail unless you have properly set up your environment with the appropriate authentication.
docs/deployment.rst
Outdated
then these requests will fail. | ||
|
||
Taking Github as an example, it's possible to use SSH to authenticate in order | ||
to allow the knowledge repo server access. To set this up: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github -> GitHub?
I would recommend that people use deploy keys (which are repository specific) rather than a personal ssh key, and can be granted read-only access. (See: https://developer.github.com/v3/guides/managing-deploy-keys/#deploy-keys).
It's also possible to bypass some of this configuration by preparing the ssh-agent in the environment to be preloaded with a specific key, for example: ssh-add /decrypted_secrets/id_rsa
, and adding the host to the list of known hosts: ssh-keyscan -t rsa -p <ssh port> <host> >> ~/.ssh/known_hosts
.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's good to know. Let me try to set that up internally, and then update the guide accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep @matthewwardrop that's a much better solution and works. I learned something. I updated the guidance accordingly with your other edits.
✅ Build knowledge-repo 1.0.629 completed (commit 2f082b8669 by @srowen) |
@srowen Thanks again for your documentation improvements! |
* Add note about setting up Github authentication with ssh * Update guidance to use GitHub deployment keys * Minor wording changes.
Description of changeset:
Add note about setting up Github authentication with ssh.
This is intended to document the suggestion in #428 and this has worked for me.
Test Plan:
Built and checked the docs.
Auto-reviewers: @NiharikaRay @matthewwardrop @earthmancash @danfrankj