Error: listen tcp :3000: bind: address already in use
Solution:
# Find process using port 3000
lsof -i :3000 # Linux/macOS
netstat -ano | findstr :3000 # Windows
# Kill process
kill -9 <PID> # Linux/macOS
taskkill /PID <PID> /F # Windows
# Or use different port
./gityar web -p 3001
Error: Failed to connect to database
Solutions:
SQLite:
# Check write permissions
chmod 755 data/
MySQL:
[database]
DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gityar
USER = gityar
PASSWD = correct_password
PostgreSQL:
[database]
DB_TYPE = postgres
HOST = 127.0.0.1:5432
NAME = gityar
USER = gityar
PASSWD = correct_password
SSL_MODE = disable
Possible causes:
Reset Password:
Solutions:
In app.ini:
[auth]
ENABLE_LDAP = true
[ldap]
HOST = ldap.example.com:389
BASE_DN = dc=example,dc=com
Error: Permission denied
Solutions:
Check repository access:
Check authentication:
# Test SSH
ssh -T git@localhost
# Test HTTP
curl -u username:password http://localhost:3000/user/repo.git/info/refs
Check branch protection:
HTTP:
# Check URL
git clone http://localhost:3000/user/repo.git
# With credentials
git clone http://username:password@localhost:3000/user/repo.git
SSH:
# Check SSH key
ssh -T git@localhost
# Verbose
GIT_SSH_COMMAND="ssh -v" git clone git@localhost:user/repo.git
Causes:
Solution:
cd your-repo
git status
git log --all
git branch -a
# If empty, create initial commit
echo "# My Project" > README.md
git add .
git commit -m "Initial commit"
git push origin main
Solutions:
Enable caching:
[cache]
ADAPTER = memory
INTERVAL = 60
Use reverse proxy:
Optimize database:
# MySQL
mysqlcheck -o gityar -u root -p
# PostgreSQL
vacuumdb -d gityar
Increase resources:
Solutions:
Enable Git garbage collection:
[repository]
ENABLE_AUTO_GIT_GC = true
GC_AUTO_THRESHOLD = 100
Use shallow clone:
git clone --depth 50 http://localhost:3000/user/repo.git
Enable LFS for large files
Check configuration:
[mailer]
ENABLED = true
HOST = smtp.example.com:587
FROM = gityar@example.com
USER = gityar@example.com
PASSWD = password
IS_TLS_ENABLED = true
Test connection:
telnet smtp.example.com 587
Check logs:
tail -f log/gityar.log | grep mailer
Checklist:
Test webhook:
Check logs:
tail -f log/gityar.log | grep webhook
log/gityar.log
log/http.log
In app.ini:
[log]
MODE = file
LEVEL = Info # Trace, Debug, Info, Warn, Error, Critical
[log]
LEVEL = Debug
Restart gityar and check logs for detailed information.
Backup:
# SQLite
cp data/gityar.db gityar-backup.db
# MySQL
mysqldump -u root -p gityar > backup.sql
# PostgreSQL
pg_dump gityar > backup.sql
Restore:
# SQLite
cp gityar-backup.db data/gityar.db
# MySQL
mysql -u root -p gityar < backup.sql
# PostgreSQL
psql gityar < backup.sql
SQLite to MySQL:
app.iniSolution:
# Check templates directory
ls templates/
# Rebuild from source
go build -o gityar ./cmd/gityar
Solution:
# Check public directory
ls public/
# Rebuild or restart
./gityar web
Solution:
/docs/docs/faqInclude: