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

Add note about setting up Github authentication with ssh #477

Merged
merged 3 commits into from
Dec 15, 2018
Merged

Add note about setting up Github authentication with ssh #477

merged 3 commits into from
Dec 15, 2018

Conversation

srowen
Copy link
Contributor

@srowen srowen commented Dec 14, 2018

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

@AppVeyorBot
Copy link

Copy link
Collaborator

@matthewwardrop matthewwardrop left a 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!

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.
Copy link
Collaborator

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.

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:
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@AppVeyorBot
Copy link

@matthewwardrop
Copy link
Collaborator

@srowen Thanks again for your documentation improvements!

@matthewwardrop matthewwardrop merged commit 004e381 into airbnb:master Dec 15, 2018
tanuj208 pushed a commit to ElucidataInc/knowledge-repo that referenced this pull request Jun 6, 2019
* Add note about setting up Github authentication with ssh

* Update guidance to use GitHub deployment keys

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

Successfully merging this pull request may close these issues.

None yet

3 participants