Common issues and solutions when using Goal.
# Check which goal is being used
which -a goal
# Check if you're in a goal repository with local changes
ls -la goal/ goal/cli.py 2>/dev/null || echo "Not in goal repo"
# If you're in the goal repo and want to use the local version:
python3 -m goal # instead of just 'goal'
# Or install the local version in development mode
pip install -e .
# If not installed:
pip install goal
# If using Python 3 specifically:
python3 -m pip install goal
# Check PATH
echo $PATH | grep -o "[^:]*" | grep -E "(local|user)"
# Install with user permissions
pip install --user goal
# Add to PATH if needed
echo 'export PATH=$PATH:~/.local/bin' >> ~/.bashrc
source ~/.bashrc
# Initialize git repository
git init
# Or navigate to git repository
cd /path/to/your/repo
# Verify git status
git status
# Check current directory
ls -la goal.yaml
# Find goal.yaml
find . -name "goal.yaml" -type f
# Create config
goal init
# Use custom config
goal --config /path/to/config.yaml push
# Validate configuration
goal config validate
# Common errors and fixes:
# ✗ project.name is required
goal config set project.name "my-project"
# ✗ Invalid versioning.strategy
goal config set versioning.strategy "semver"
# ✗ Version file not found
goal config update # Auto-detects files
# Force update from detection
goal config update
# Check config location
goal config show -k project.name
# Manual edit
goal config set versioning.files '["VERSION", "pyproject.toml:version"]'
# Check git status
git status
# Stage changes
git add .
# Check staged files
git diff --cached --name-only
# Use unstaged changes
goal commit --unstaged
# Generate message without committing
goal commit
# Use custom message
goal push -m "Your custom message"
# Configure templates
goal config set git.commit.templates.feat "feat({scope}): add {description}"
# Check if files are already committed
git log --oneline -1
# Check untracked files
git ls-files --others --exclude-standard
# Add specific files
git add specific_file.py
goal push
# Check version files
goal config get versioning.files
# Verify current version
goal version
# Manual version sync
goal config set versioning.files '["VERSION", "pyproject.toml:version"]'
goal push --yes -m "chore: sync version"
# Check current version
cat VERSION
# Fix version format
echo "1.0.0" > VERSION
git add VERSION
# Or use semver format
goal config set versioning.strategy "semver"
# Check bump rules
goal config show -k versioning.bump_rules
# Adjust thresholds
goal config set versioning.bump_rules.minor 100
goal config set versioning.bump_rules.major 500
# Interactive - will prompt to continue
goal push
# Skip tests
goal push --yes -m "fix: critical hotfix"
# Or disable tests in config
goal config set strategies.python.test ""
# Check project type
goal config get project.type
# Set custom test command
goal config set strategies.python.test "python -m pytest"
goal config set strategies.nodejs.test "npm run test:ci"
# Set timeout in config
goal config set advanced.performance.timeout_test 120
# Or run tests manually
pytest tests/
goal push --yes
If you see HTTPError: 400 Bad Request ... File already exists, it means you’re trying to upload a package version that’s already on PyPI.
# Quick fix: clean dist and rebuild
rm -rf dist build *.egg-info
python -m build
# Upload ONLY the current version artifacts
twine upload dist/*your-package-{version}*
# Or let goal handle it correctly (goal v2.1.23+):
python3 -m goal # use local version if in goal repo
Why this happens: twine upload dist/* uploads ALL files in dist/, including old versions. Goal v2.1.23+ automatically filters to upload only the current version.
# Check if you're using the right version
goal --version
# For PyPI, create token at: https://pypi.org/manage/account/token/
# Option 1: ~/.pypirc
[pypi]
username = __token__
password = pypi-xxxxxxxx
# Option 2: Environment variables
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-xxxxxxxx
# Option 3: Configure in goal.yaml
goal config set registries.pypi.token_env "PYPI_TOKEN"
export PYPI_TOKEN=pypi-xxxxxxxx
# Check project type
goal config get project.type
# Install missing tools
# Python:
pip install build twine
# Node.js:
npm install -g npm
# Rust:
cargo install cargo-publish
# Check current branch
git branch
# Set upstream branch
git push --set-upstream origin main
# Or specify branch explicitly
goal config set git.push.branch "main"
# Goal doesn't support force push directly
# Use git command then goal for versioning
git push --force-with-lease
goal push --no-push # Skip push in Goal
# Check token
echo $PYPI_TOKEN
# Test upload
twine check dist/*
# Use test PyPI first
goal config set registries.testpypi.token_env "TEST_PYPI_TOKEN"
goal config set strategies.python.publish "twine upload --repository testpypi dist/*"
# Check authentication
npm whoami
# Check package.json
cat package.json | grep version
# Dry run publish
npm publish --dry-run
# Check cargo login
cargo login --registry crates.io
# Check Cargo.toml
cat Cargo.toml | grep version
# Dry run
cargo publish --dry-run
# Check file count
git ls-files | wc -l
# Configure max_files for splitting
goal config set advanced.performance.max_files 30
# Use specific paths
goal push --no-all
# Use split commits
goal push --split
# Or exclude files
echo "*.log" >> .gitignore
git add .gitignore
# Check hook configuration
goal config get hooks.pre_commit
# Run hook manually
bash -c "$(goal config get hooks.pre_commit)"
# Temporarily disable
goal config set hooks.pre_commit ""
# Check if script is executable
chmod +x scripts/my-hook.sh
# Check permissions
ls -la scripts/
# Use absolute path
goal config set hooks.pre_commit "/full/path/to/script.sh"
# GitHub Actions
- name: Install Goal
run: pip install goal
# Or include in requirements.txt
echo "goal" >> requirements.txt
pip install -r requirements.txt
# Configure git user
git config user.name "CI Bot"
git config user.email "ci@bot.com"
# Or use environment
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
# Check environment
env | grep TOKEN
# Set in CI config
env:
PYPI_TOKEN: $
# Or export
export PYPI_TOKEN="your-token"
# Goal doesn't have verbose flag yet
# Use git commands directly
git -c trace=true status
# Check config
goal config show
# Show full config
goal config show > config-debug.yaml
# Validate
goal config validate
# Check specific values
goal config get project.name
goal config get versioning.files
# Check git status
git status
# Check staged files
git diff --cached --stat
# Check last commit
git log --oneline -1
# Check tags
git tag -l
# Solution: Stage your changes
git add .
goal push
# Solution: Fix tests or skip them
goal push # Will prompt to continue
# or
goal push --yes -m "fix: skip tests"
# Solution: Create VERSION file or configure version files
echo "1.0.0" > VERSION
git add VERSION
# or
goal config update
# Solution: Validate and fix config
goal config validate
goal config set project.name "my-project"
goal --version
goal --help
goal push --help
goal config --help
# Collect information
goal --version > issue-info.txt
goal config show >> issue-info.txt
git status >> issue-info.txt
# Include in GitHub issue
# Reset to last good state
git log --oneline
git reset --hard HEAD~1
# Check version
cat VERSION
# Try again
goal push --dry-run
# Set correct version manually
echo "1.0.1" > VERSION
git add VERSION
git commit -m "chore: fix version"
# Create missing tag
git tag v1.0.1
git push origin v1.0.1
# Backup current config
cp goal.yaml goal.yaml.backup
# Regenerate config
goal init --force
# Restore custom settings
goal config set git.commit.scope "my-scope"