About: generalized specialist - software engineer and data scientist - particularly fond of Python and R
Location:
New York metropolitan area
Joined:
Oct 5, 2020
How to Generate a GitHub Token for Pushing Repos with Greening
Publish Date: Apr 7
1 0
When using greening new to auto-create and push a repo to GitHub, you'll need a GitHub token with proper permissions. This token allows Greening to authenticate with the GitHub API on your behalf and create new repositories for your projects.
Hey! My name's Chris Greening and I'm a software developer from the New York metro area with a diverse range of engineering experience - beam me a message and let's build something great!
For security, never hard-code your token into your project.
Instead, add it to your environment using one of the following:
Unix/macOS
export GITHUB_TOKEN=ghp_your_token_here
You can also add this to your ~/.bashrc, ~/.zshrc, or ~/.bash_profile.
Windows (Command Prompt)
set GITHUB_TOKEN=ghp_your_token_here
Windows (PowerShell)
$env:GITHUB_TOKEN="ghp_your_token_here"
✅ Step 3: Use It with Greening
Now that your token is available, Greening will detect it automatically.
Just run:
greening new
If you have create_github_repo: true in your greening.yaml config, Greening will:
Create a new GitHub repo
Add the remote
Push your project
No extra steps. ✨
🧼 Bonus: Keeping Your Token Safe
Don’t commit .env files or shell profiles to public repos.
Rotate your token periodically, especially if it becomes exposed.
Use fine-grained tokens for more control (GitHub now supports these).
Greening aims to make shipping your ideas painless — and this is a big part of that. By setting up your token once, you’ll unlock powerful automation across every new project.
Happy shipping 🌱
—
Got questions? Open an issue or join the discussion at
greening is an opinionated, lightweight project automation tool for solo developers and creative coders. With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site. No boilerplate. No setup hell. Just instant polish.
🌱 Greening
greening is an opinionated, full-stack project automation tool for solo developers and creative coders.
With just a few commands, you can scaffold a production-ready Python package — complete with docs, tests, GitHub Actions workflows, PyPI packaging, and an auto-deployed GitHub Pages site
No boilerplate. No setup hell. Just instant polish.