Enhance onboarding script and documentation for developer setup. Added functions for Git configuration, SSH key generation, and connection testing. Updated README with setup instructions and usage tips.

This commit is contained in:
ilia 2025-08-31 13:38:29 -04:00
commit e2bc5a2b53
3 changed files with 1346 additions and 0 deletions

71
README.md Normal file
View File

@ -0,0 +1,71 @@
# Developer Onboarding
A comprehensive developer environment setup toolkit that automates the installation of essential tools and configures Git and SSH for seamless development workflows.
## Overview
This project provides scripts and documentation to quickly set up a development environment with all the necessary tools, from basic system utilities to modern development tools and containerization platforms.
## Quick Start
### Prerequisites
- Ubuntu/Debian-based Linux system
- `sudo` privileges for package installation
- Internet connection
### Setup Process
1. **Run the onboarding script:**
```bash
chmod +x onboarding.sh
./onboarding.sh
```
2. **Follow the interactive prompts:**
- Configure Git username and email
- Generate SSH keys for secure Git operations
- Test SSH connection to your Git server
## What Gets Configured
### Git Configuration
- Global username and email setup
- Credential caching for convenience
- Color output for better readability
### SSH Key Management
- Ed25519 SSH key generation (modern, secure)
- Automatic key copying to clipboard
- SSH connection testing to Git server
## Files in This Repository
- `onboarding.sh` - Main interactive setup script
- `onboarding.sh.save` - Backup/alternative version
- `applications.md` - Complete list of installed applications
- `README.md` - This file
## Usage Tips
- The script is idempotent - safe to run multiple times
- SSH keys are only generated if they don't already exist
- Git config is only set if not already configured
- All operations are interactive with user confirmation
## Customization
You can modify the `onboarding.sh` script to:
- Change the Git server URL (currently set to `10.0.30.169:3000`)
- Adjust SSH key types or parameters
- Add additional Git configuration options
## Support
If you encounter issues:
1. Ensure you have the required permissions
2. Check network connectivity to the Git server
3. Verify SSH key permissions (`chmod 600 ~/.ssh/id_ed25519`)
## Contributing
Feel free to submit issues or pull requests to improve the onboarding experience.

1203
applications.md Normal file

File diff suppressed because it is too large Load Diff

72
onboarding.sh Executable file
View File

@ -0,0 +1,72 @@
#!/bin/bash
# Git + SSH onboarding script for developer environments.
# Prompts for missing git config, sets recommended options, and helps create and test SSH keys.
# Author: [ilia] | Created: [Aug 28, 2025]
set -euo pipefail # Exit on error, unset vars, and in pipe failures
## FUNCTIONS
# Prompt for and set global git config if missing
set_git_config() {
local key="$1"
local prompt="$2"
if ! git config --get "user.${key}" &>/dev/null; then
read -rp "$prompt" value
git config --global "user.${key}" "$value"
fi
}
# Create ed25519 SSH key if missing
setup_ssh_key() {
if [ ! -f ~/.ssh/id_ed25519 ]; then
read -rp "No ed25519 SSH key found! Create one for Git usage? (y/n): " sshyn
if [[ "$sshyn" =~ ^[Yy]$ ]]; then
ssh-keygen -t ed25519 -C "$(git config --get user.email)"
fi
fi
}
# Show public SSH key and copy to clipboard
show_and_copy_ssh_key() {
if [ -f ~/.ssh/id_ed25519.pub ]; then
echo "Your public ed25519 SSH key:"
cat ~/.ssh/id_ed25519.pub
if command -v xclip &>/dev/null; then
xclip -sel clip < ~/.ssh/id_ed25519.pub
echo "Public key copied to clipboard."
fi
echo "Add this key to Gitea: http://10.0.30.169:3000/user/settings/keys"
else
echo "No public ed25519 SSH key found. You might need to generate it."
fi
}
# SSH connection test
test_ssh_connection() {
read -rp "Test SSH connection to Gitea server? (y/n): " testssh
if [[ "$testssh" =~ ^[Yy]$ ]]; then
ssh -T gitvm@10.0.30.169
fi
}
## MAIN LOGIC
echo "Checking Git global config..."
set_git_config "name" "Enter your Git user name: "
set_git_config "email" "Enter your Git email: "
# Set best-practice Git global defaults
git config --global credential.helper cache
git config --global color.ui auto
echo
echo "Current global Git configuration:"
git config --global --list
setup_ssh_key
show_and_copy_ssh_key
test_ssh_connection
echo
echo "Setup complete!"