put your code in
Push your code
Sign up, make an access token, and push with git or upload a folder.
On this page
Sign up
Press Start
on ruhub.ai and create an account. Then wait for approval. You will see You're on the list.
You won't get a message, so check back here.
Then choose your handle.
Create a repository
Open the new repository page (you need to be signed in), type a name and press Create repository
. The repository is private. Its first branch is main.
| Rule | Value |
|---|---|
| Handle | 3 to 39 characters: lowercase letters, digits and single hyphens, none at the start or end. You can't change this later. |
| Repository name | Starts with a letter or number. Letters, numbers, hyphens, underscores and dots. Up to 100 characters. |
| Repositories per account | 50 |
Make an access token
Git signs in with a token, not your password. Open Access tokens, fill in the form and press Create token
.
| Field | Choices | What it lets git do |
|---|---|---|
| Name | Any name | Nothing. It tells tokens apart. |
| Access | Push and clone (default), or Clone only | Push and clone: clone, fetch and push. Clone only: clone and fetch. |
| Repositories | All of mine (default), or one repository | All of mine: every repository you own. One repository: only that one. |
| Expires in | 7 days, 30 days, 90 days (30 days is the default) | After that day the token stops working. |
| Topic | Detail |
|---|---|
| Starts with | ruhub_pat_ |
| Shown once | Treat it like a password. You won't see it again.Press Copy. Lost it? Make a new one. |
| Revoke | Press Revoke beside the token and confirm. git on every machine that uses this token is refused from the next request. This can't be undone. |
| Habits | One token per computer, named after it, like laptop. Use Clone onlyon a machine that only reads. |
Push with git
Git stores your name and e-mail in every commit.
git --version
git config --global user.name "Your Name"
git config --global user.email "you@example.com"Copy the address from the Quick setup panel of your empty repository. <owner> is your handle, <repo> the repository name. It must end in .git. There is no SSH.
https://ruhub-git.fly.dev/<owner>/<repo>.gitWhen git asks for a login:
| Git asks for | Type |
|---|---|
| Username | Anything. Your handle is fine. |
| Password | Your access token. Never your account password. |
| Never | Put the token in the address, like https://name:token@... Git saves the address in .git/config, and your shell saves it in its history. |
A folder without git
Windows PowerShell
cd C:\path\to\your-project
git init
git add .
git commit -m "First commit"
git branch -M main
git remote add origin https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u origin mainWindows Command Prompt
cd /d C:\path\to\your-project
git init
git add .
git commit -m "First commit"
git branch -M main
git remote add origin https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u origin mainmacOS and Linux
cd path/to/your-project
git init
git add .
git commit -m "First commit"
git branch -M main
git remote add origin https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u origin mainCommand Prompt takes only double quotes. Git Bash takes the macOS and Linux commands.
A project already in git
No remote yet:
git remote add origin https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u origin mainIt has origin, like GitHub: add Ruhub as a second remote.
git remote -v
git remote add ruhub https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u ruhub main
git push ruhub --tagsOr point origin at Ruhub.
git remote set-url origin https://ruhub-git.fly.dev/<owner>/<repo>.git
git push -u origin mainAnother branch name? Rename it first: git branch -M main.
Every day
git add .
git commit -m "Describe the change"
git pushgit switch -c my-branch
git push -u origin my-branchgit tag v1.0
git push origin v1.0git clone https://ruhub-git.fly.dev/<owner>/<repo>.git
cd <repo>A clone of an empty repository is an empty folder. Ruhub refuses to delete or force-push the default branch, and to move or delete a pushed tag. Other branches are free.
Saved sign-ins and settings
Git Credential Manager may open a sign-in window: username anything, password your token. To forget a wrong saved token, type all four lines, ending on an empty line. Any shell works.
git credential reject
protocol=https
host=ruhub-git.fly.dev
| Situation | What to do |
|---|---|
| macOS | The keychain keeps the token after the first push. |
| Linux asks every time | Keep the token in memory for an hour: git config --global credential.helper "cache --timeout=3600" |
| The helper named store | Avoid it on a shared computer. It writes the token to a file as plain text. |
LF will be replaced by CRLF | A warning, not an error. The usual Windows setting: git config --global core.autocrlf true |
| Behind a company proxy | Use your company's address: git config --global http.proxy http://proxy.example.com:8080 |
| A certificate error | Use the Windows certificate store: git config --global http.sslBackend schannel |
Or upload a folder
- On your empty repository, press Upload files.
- Choose a folder, or drop one on the page.
- Add a commit message if you like. Blank becomes
Upload N files
. - Press Upload, then
See the commit
.
| Rule | Value |
|---|---|
| Limits | Up to 10,000 files and 100 MB, each file at most 10 MB. A .git folder inside is left out. |
| Commit message | Up to 500 characters |
| Path | Up to 1024 characters |
| Files that start with a dot | Uploaded, like .gitignore |
| Where it lands | The folder's contents land at the root of <branch>. Files with the same path are replaced. |
| Branch | Always the default one |
| Commits | One upload, one commit, by Ruhub web upload |
| Cannot do | Delete files, or upload to another branch. Use git. |
See your commit
It shows on the Code and History tabs. A new push can take a moment: press Refresh. Problems? See Reference.
Checked against Ruhub on .
