This serves as an exposé and example of the typical competent local setup for game development workflow within your local Mac for Agile style collaboration.
- ToDo: what are the DameDev basic principles especially for digital art?
OS Setup - Everything begins with the local...
- Install your OS: Linux Mint, a Mate Desktop Environment in our case, but you are free to choose any or many available - beginner's guide.
- Concept: Your first user is reserved for you and is the only user with
sudo
access. If you have multiple customers or entities to code for separate them by creating additional accounts, leaving the first one untarnished. If you have separate boxes for separate gigs like we do the one user may suffice for you, yet a separate single user for coding is best recommended. - Upgrade base packages: step 01 - the base
- Configure your shell: step 02 - the 'oh your shell'
- Useful Global Apps!: step 03 - global apps
From this point, each local-user development toolset is configured "as a user," including if only one user opted to be used.* The actual development environment is encapsulated by a Linux user.
This sequence applies to each local development user.
- Copy your public GitHub email address: https://github.com/settings/keys
- Follow these instructions to configure Git: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
Instructions - Git Client, initial setup
git config --global user.name "yer-github-handle"
git config --global user.email "12781006+yer-handle@users.noreply.github.com"
git config --list --show-origin
Instructions - SSH Key
# Okay to accept all defaults
ssh-keygen -t ed25519
- Copy public key into clipboard:
sudo apt install xclip
cat ~/.ssh/id_ed25519.pub | xclip -i -sel clip
- Navigate to your account keystore: https://github.com/settings/keys
- Paste public key from clipboard into the
Key
field,- leave
Key type
as "Authentication Key" - provide no
Title
- press
Add SSH Key
- leave
- Generating a new GPG key
- Adding a GPG key to your GitHub account
- Telling Git about your signing key
- Signing commits
Instructions - GPG Key Setup, Signing
NOTE: This Mint distribution has all the required packages and no need to install anything.
Alternatively one needs sudo apt install gnupg gnupg-agent pinentry-gnome3
or if gnupg2 package is desired
instead sudo apt install gnupg2 gnupg-agent pinentry-gnome3
- Generate a new GPG key:
# Test for Pin Entry; else install from comments above
echo GETPIN | pinentry
gpg --full-generate-key
gpg --list-secret-keys --keyid-format=long
- Copy value after rsaNNNN/ ,such as 3AA5C34371567BD2
- Export key armor into clipboard:
gpg --armor --export 3AA5C34371567BD2 | xclip -i -sel clip
- Paste it into GPG Keystore as with SSH Key: https://github.com/settings/keys
- Tell Git Client to use your key:
git config --global --unset gpg.format
gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey 3AA5C34371567BD2
git config --global commit.gpgsign true
git config --list --show-origin
echo -e '\nexport GPG_TTY=$(tty)' >> ~/.zprofile
- Test signing a commit and pushing to see the verified tag:
git commit -S -m "YOUR_COMMIT_MESSAGE"
git push
- https://sdkman.io/
- Install: JDK, Kotlin, Gradle
Instructions - SDK Manager Setup
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java
sdk install kotlin
sdk install gradle
sdk current
IMPROVEMENT - Seggregate Shell Elements
NOTE: The installer will assume single zsh config file target. Instead edit these files as follows:
#.zshenv
# ...
export SDKMAN_DIR="$HOME/.sdkman"
#.zprofile
# ...
export GPG_TTY=$(tty)
#.zshrc
# ...
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
- Download tar.gz to your
Downloads
folder from https://www.jetbrains.com/toolbox-app/ - Create a
~/opt
folder and extract the tar.gz into it. - Launch the Toolbox app from commandline once.
- Click to install the tools you need.
Instructions - Example Toolbox Setup, IDEA
mkdir ~/opt
cd ~/Downloads/
wget https://download-cdn.jetbrains.com/toolbox/jetbrains-toolbox-2.0.4.17212.tar.gz
tar -xvzf jetbrains-toolbox-2.0.4.17212.tar.gz -C ~/opt
cd ~/opt
./jetbrains-toolbox
Most hackers work directly with GitHub CLI which allows not only ordinary Git operations by a wrapper but also direct controls over the entire GitHub API, driving all aspects of the DevOps lifecycle such as pull requests from right under your fingertips.
GH CLI - the Gist of it!
- Assumptions:
- SSH Authentication Key is configured, i.e. ed25519.
- Default Git protocol is SSH and not HTTPS.
- GPG Signing Key is configured.
- Local Git Client signs commits by default.
- Next Steps:
- Install GH client EITHER as a local user, OR globally with Apt.
- Note: We use global install because all our projects users employ the CLI.
- https://github.com/cli/cli#linux--bsd
- https://cli.github.com/
- Configure Key using JetBrains IDE.
- Run
gh config set git_protocol ssh --host github.com
to set Git protocol to SSH. - Run
gh config set browser google-chrome
to set Browser to Google Chrome. - Run
gh repo clone aaronfllr/local_mint
to test by cloning my repo.- though you should really fork!
- Install GH client EITHER as a local user, OR globally with Apt.
GH Install - Global Install Example
- https://github.com/cli/cli/blob/trunk/docs/install_linux.md
- Release page: https://github.com/cli/cli/releases/tag/v2.36.0
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
Add to the environment - Add token environment variable to ~/.zshenv
vi ~/.zshenv
# Add a line that looks like so:
export GITHUB_TOKEN="ghp_YerIdeGeneratedToken"
# Test with:
gh auth status
# Should report authenticated by token
gh auth logout
gh auth status
# Should still report unauthenticated by token
# Example of authenticated response:
➜ ~ gh auth status
github.com
✓ Logged in to github.com as yer-handle (GH_TOKEN)
✓ Git operations for github.com configured to use ssh protocol.
✓ Token: ghp_************************************
✓ Token scopes: gist, notifications, read:audit_log, read:gpg_key, read:org, read:project, read:user, repo, user:email, workflow, write:discussion, write:packages
- About environment: https://cli.github.com/manual/gh_help_environment
Here is the entire manual: https://cli.github.com/manual/