# API

This is an exmaple of generating a repository from the command-line.

#!/usr/bin/bash

export user=jinghuazhao
export token=$(cat ~/doc/access) export API=https://api.github.com export header="Accept: application/vnd.github.v3+json" export name=Believe # 1. create the repository curl -X POST -u$user:$token -H "$header" -d '{"name": "'"$name"'"}'$API/user/repos


At one one, the git remote origin had a typo which is fixed with