Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

Note: You will need to setup an ssh key to access github with your account. 

If you have already performed git clone with https, you can alternatively set up a token to be able to push any changes to our repo and you will need to enter this token in replacement of your password each time you push.

If you are setting up fresh, you need to use an ssh key to link your account. To learn how to add an ssh key you can run run the following commands in vagrant. Then, make sure to link it to your Github account.

Code Block
languagebash
# Create an ssh key
ssh-keygen -t ed25519 -C "your_email@example.com"
# Press enter to save at default location, and enter again to use no passphrase

# Add your ssh key to the ssh agent
eval "$(ssh-agent -s)"

# Add all keys to the ssh agent
ssh-add


Also, if you have already performed git clone with https, you can switch to ssh by performing the command below. If you don't, you will constantly be prompted for your user/token still even if you've already added your ssh key and linked it to your Github account.

Code Block
languagebash
# Make sure you are in the git repo
cd firmware_xivfwxv

# Switch from https to ssh
git remote set-url origin git@github.com:uw-midsun/firmware_xivfwxv.git


While we're at it, let's configure some settings (while still in our vagrant box):

Code Block
languagebash
# Configure git
git config --global user.name "Your Name"
git config --global user.email youremail@example.com

git config --global push.default simple
git config --global core.autocrlf input

# Only works for git >= 2.9
git config core.hooksPath hooks
# If git < 2.9 (All boxes before the 18.04 release)
rm -rf .git/hooks && ln -s ~/shared/firmware_xivfwxv/hooks .git/hooks

# Make sure that pylint is up to date so that the hooks don't fail, and install autopep8 for Python formatting
pip3 install pylint autopep8

# Make sure virtualenv is installed so Python dependencies get properly installed
sudo pip3 install virtualenv

...

Code Block
languagebash
# Bring up the virtual machine
# This step is only necessary after a reboot
vagrant up
# Access the box
vagrant ssh
# Move to the firmware_xivfwxv folder
cd shared/firmware_xivfwxv
# See https://github.com/uw-midsun/firmware_xivfwxv #usage for some common commands
make [cmd] ...

# To exit the virtual machine press CTRL + D
# Stop the virtual machine
vagrant halt

...