iluozhiqiang/hermes-aimaxia/github-private-repo-download

Claude Code and agent skill by iluozhiqiang/hermes-aimaxia

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Download a private GitHub repository as a zipball using Python when git CLI is unavailable

Install

npx vskill@latest install iluozhiqiang/hermes-aimaxia/github-private-repo-download

SKILL.md

The same SKILL.md was published earlier as iluozhiqiang/hermes-aimaxia/github-private-repo-download.

GitHub Private Repo Download (No Git CLI)

Download a private GitHub repository as a zipball using Python when git is not installed in the container.

Context

  • Container has no git CLI installed
  • apt-get install git times out (network slow)
  • Private repos return HTTP 404 without authentication
  • Token stored in /root/.git-credentials

Steps

1. Extract token from git-credentials
python
import re
with open("/root/.git-credentials") as f:
cred = f.read().strip()
match = re.search(r'ghp_[A-Za-z0-9]+', cred)
token = match.group(0)
2. Confirm repo exists and is private (use token in header, not URL)
python
import urllib.request, json
url = f"https://api.github.com/repos/{org}/{repo}"
req = urllib.request.Request(url, headers={
"Authorization": f"token {token}",
"Accept": "application/vnd.github.v3+json",
"User-Agent": "curl/7.88.1"
})
with urllib.request.urlopen(req, timeout=10) as resp:
data = json.loads(resp.read())
print(data["default_branch"]) # confirms repo is accessible
3. Download zipball
python
url = f"https://api.github.com/repos/{org}/{repo}/zipball/{branch}"
req = urllib.request.Request(url, headers={
"Authorization": f"token {token}",
"User-Agent": "curl/7.88.1"
})
with urllib.request.urlopen(req, timeout=120) as resp:
data = resp.read()
with open("/path/to/repo.zip", "wb") as f:
f.write(data)
4. Extract and organize
python
import zipfile, os
with zipfile.ZipFile(zip_path, 'r') as z:
top_level = z.namelist()[0].split('/')[0]
z.extractall(extract_base)
os.rename(os.path.join(extract_base, top_level), dest_path)
os.remove(zip_path)

Key Learnings

  • GitHub private repos return 404 (not 403) without token — this is intentional to prevent enumeration
  • GitHub API accepts token via Authorization: token <token> header (not URL-embedded token for API calls)
  • Zipball URL format: https://api.github.com/repos/{org}/{repo}/zipball/{branch}
  • Downloaded zip has top-level dir named {org}-{repo}-{commit_hash}, must rename after extraction
  • To list all repos in a private org: https://api.github.com/orgs/{org}/repos?per_page=100 (requires token)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/iluozhiqiang/hermes-aimaxia/github-private-repo-download/badge)](https://verified-skill.com/skills/iluozhiqiang/hermes-aimaxia/github-private-repo-download)

Something wrong with this skill or its page? Tell us.