Adding a new user or developer account¶
User accounts on the RTC, ICC, and AOC machines are members of
magaox. Developer accounts are additionally members of
/opt/MagAOX/source/MagAOX/setup/ contains scripts to help you remember which groups and what permissions the
~/.ssh folder should have.
Creates a new user account in the group
$ /opt/MagAOX/source/MagAOX/setup/add_a_user.sh klmiller
add_a_user.sh (in fact, uses it). Additionally adds the new account to the
wheel (RTC/ICC) or
sudo (AOC) group and
Configuring git for a new user account¶
We use GitHub Personal Access Tokens coupled with HTTPS push to synchronize changes on the instrument. Configuration is required for your credentials to be remembered.
Log in to the computer (AOC, RTC, ICC, vm, etc) where you want to configure git
Change directories to a repository (e.g.
cd /opt/MagAOX/calib) and verify it is set up for HTTPS push:
$ cd /opt/MagAOX/calib $ git remote -v origin https://github.com/magao-x/calib.git (fetch) origin https://github.com/magao-x/calib.git (push)
If you haven’t already for this machine, configure your name and email address:
$ git config --global user.email "firstname.lastname@example.org" $ git config --global user.name "Your Name Here"
Configure the ‘store’ credential helper, which will store your credentials so you do not have to re-enter them:
$ git config --global credential.helper store
Create (or retrieve from your password manager) a GitHub Personal Access Token. If you don’t have one, log in to GitHub and visit https://github.com/settings/tokens.
Attempt to push, and enter/paste your username and personal access token as password:
$ git push Username for 'https://github.com/magao-x/calib.git': your-github-user-name Password for 'https://email@example.com/magao-x/calib.git':
(Note that even if you don’t see it, your key is being entered.)
Attempt to push again. You should not be prompted for credentials a second time.