Files
.profile/GITEA_SETUP.md

189 lines
4.9 KiB
Markdown

# Gitea .profile Repository
## ✅ Setup Complete!
Your `.profile` repository has been successfully created on Gitea with HTTPS authentication using a Personal Access Token (PAT).
### 📍 Repository Information
- **Repository Name:** `.profile`
- **User:** willow-ai
- **Full URL:** https://git.wholeworldcoding.com/willow-ai/.profile
- **Clone URL:** https://git.wholeworldcoding.com/willow-ai/.profile.git
- **Authentication:** Personal Access Token (PAT)
- **HTTPS:** ✅ Working
### 🔑 PAT Details
```
Token: d1da5d8c17a64d89afca0123c5b781073e69f9c1
Username: willow-ai
```
### 💻 Git Configuration
Configure git to remember your PAT:
```bash
# Clone the repository
git clone https://git.wholeworldcoding.com/willow-ai/.profile.git
# Configure git to store the token
git config --global credential.https.*.password d1da5d8c17a64d89afca0123c5b781073e69f9c1
# Verify setup
git remote -v
```
### 📝 First Push
```bash
cd /Users/stevensherry/.profile
# Configure git user (required for commits)
git config user.name "Willow"
git config user.email "willow@wholeworldcoding.com"
# Add and commit
git add .
git commit -m "Your commit message here"
# Push to Gitea
git push -u origin main
```
### 🔄 Clone and Pull
```bash
# Clone fresh copy
git clone https://git.wholeworldcoding.com/willow-ai/.profile.git
# Pull latest changes
cd .profile
git pull origin main
# Make changes
# edit files...
git add .
git commit -m "Your message"
git push origin main
```
### 🛠️ Helper Scripts
A helper script `git-auth` is available in `/scripts/git-auth` for automated git operations.
### 📁 Repository Structure
```
.profile/
├── README.md # This file and initial Gitea docs
├── GITEA_SETUP.md # Detailed Gitea API setup instructions
├── GITEA_README.md # This file with quick start guide
├── scripts/
│ ├── git-auth # Git authentication helper
│ └── git-gitea # API-based git commands
└── .git/ # Git repository
```
### 🌐 Access
- **Web UI:** https://git.wholeworldcoding.com/willow-ai/.profile
- **API:** https://git.wholeworldcoding.com/api/v1
- **GitHub Compatible URL:** https://git.wholeworldcoding.com/willow-ai/.profile.git
### 🧪 Testing HTTPS
```bash
# Test connection
export GITEA_TOKEN="d1da5d...f9c1"
curl -H "Authorization: Bearer $GITEA_TOKEN" \
https://git.wholeworldcoding.com/api/v1/user/repos
# Should return JSON with repository info
```
### 📚 Documentation
- **GITEA_SETUP.md** - Comprehensive Gitea API guide
- **GITEA_README.md** - Quick start with this repository
- **scripts/git-gitea** - API-based git commands
- **test_gitea_https.sh** - Test script
### 🔒 Security
⚠️ **IMPORTANT:**
1. Never commit your PAT to version control
2. Don't share the token publicly
3. Store in `~/.gitea-token` (add to .gitignore)
4. Use environment variable: `export GITEA_TOKEN="..."`
```bash
# Good practice
echo "d1da5d8c17a64d89afca0123c5b781073e69f9c1" > ~/.gitea-token
chmod 600 ~/.gitea-token
# Use in scripts
source ~/.gitea-token
export GITEA_TOKEN=$GITEA_TOKEN
```
### 🎯 API Rate Limits
- **Authenticated users:** 5000 requests per hour
- **Check limits:** `curl -H "Authorization: Bearer..." api/ratelimit`
- **Headers in responses:** `X-RateLimit-Remaining`
### 📖 Quick API Reference
```bash
# List my repos
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/user/repos
# Get repo info
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos/willow-ai/.profile
# List contents
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos/willow-ai/.profile/contents
# List commits
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos/willow-ai/.profile/commits
# Create issue
curl -X POST -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos/willow-ai/.profile/issues \
-d '{"title": "Issue title", "body": "Issue description"}'
# List tags
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos/willow-ai/.profile/tags
# Search
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/search/repositories?q=python
# List all public repos
curl -H "Authorization: Bearer YOUR_TOKEN" https://git.wholeworldcoding.com/api/v1/repos
```
### 🎉 What's Working
✅ Repository created on Gitea (ID: 92)
✅ HTTPS clone with PAT
✅ API authentication with token
✅ Helper scripts for git commands
✅ Web UI access
✅ API documentation available
### 🚀 Ready to Use!
Your `.profile` repository is ready for:
- Pushing code via HTTPS/PAT
- Pulling code from Gitea
- Managing issues and PRs via API
- Creating new repositories via API
- Searching and exploring repositories
---
*Created with Hermes Gitea API integration*
*Repository: willow-ai/.profile*
*Created: $(date +%Y-%m-%d)*