-
Notifications
You must be signed in to change notification settings - Fork 13
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
Document how to use GH in the ring with 2FA. #115
Open
danielballan
wants to merge
6
commits into
NSLS-II:master
Choose a base branch
from
danielballan:document-github-2fa
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
50e09be
Document how to use GH in the ring with 2FA.
danielballan 46adb93
Apply suggestions from code review
danielballan 4bcc5e4
DOC: apply the rest of mrakitin's comments
tacaswell 343f6ed
DOC: add note about adding BL machine as a remote on your machine
tacaswell dcae9bf
Fix typo
danielballan 65bfb98
Fix capitalization.
danielballan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
*********************** | ||
Using GitHub at NSLS-II | ||
*********************** | ||
|
||
Two-factor authentication | ||
------------------------- | ||
|
||
We strongly recommend `securing your account with two-factor authentication <https://help.github.com/en/articles/securing-your-account-with-two-factor-authentication-2fa>`_. | ||
|
||
For normal use from the campus network, the most convenient way to access | ||
GitHub is using SSH. See `GitHub's SSH guide <https://help.github.com/en/articles/connecting-to-github-with-ssh>`_. | ||
Your remotes will look like: | ||
|
||
.. code-block:: bash | ||
|
||
|
||
$ git remote -v | ||
danielballan [email protected]:danielballan/bluesky (fetch) | ||
danielballan [email protected]:danielballan/bluesky (push) | ||
origin [email protected]:bluesky/bluesky (fetch) | ||
origin [email protected]:bluesky/bluesky (push) | ||
|
||
Note ``[email protected]:`` in place of where you might have | ||
``https://github.com/``. You can update a remote using | ||
|
||
.. code-block:: bash | ||
|
||
$ git remote set-url <NAME> <NEW_URL> | ||
|
||
For use inside the ring, connecting via SSH does not work. (Consult ITC to ask | ||
why.) Your best option is to use a personal access token, which you can do at | ||
`github.com/settings/tokens <https://github.com/settings/tokens>`_ or by | ||
following `GitHub's token guide <https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line>`_. | ||
You can then paste the token into a file in your home directory. Make sure | ||
to restrict the permissions with ``chmod 600 path/to/file_with_token`` or any | ||
user will be able to read it and log into GitHub as you! | ||
|
||
To *use* the token, set the remote urls in the HTTPS style (not | ||
``[email protected]:``). When you try to push you will be prompted to | ||
enter your username. After entering the username, you will be prompted | ||
to enter your password. Paste the token in instead. | ||
|
||
You can also add the beamline workstation as remote on your machine (assuming you have | ||
your ssh config set up correctly): | ||
|
||
.. code-block:: bash | ||
|
||
git remote add <NAME> git+ssh://<BL_MACHINE_NAME>/<PATH_TO_REPO> | ||
|
||
which will allow you to pull from the beamline machine to your machine | ||
and then push back out to GitHub. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ Components | |
|
||
.. toctree:: | ||
|
||
components/github | ||
components/conda | ||
components/ansible-setup | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Not sure if this is intended?
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.
Fair question. I meant "use". Maybe it could be phrase more clearly?
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.
No, don't put users inside the ring, it's not safe there 🤣.
Maybe we can better say "For use in the controls network ..."?