Set up Git once
Everyone who uses the collection does this once, on their own computer. It takes about ten minutes.
1. Install Git
Section titled “1. Install Git”korAPI uses the Git that is installed on your computer. If the Git bar at the bottom of the sidebar says Not installed, install it:
macOS
- Open Terminal (in Applications › Utilities).
- Type
git --versionand press Return. - If a window asks to install the command line developer tools, choose Install and wait until it finishes.
- Type
git --versionagain. It answers with a version, such asgit version 2.47.1.
Windows
- Download Git for Windows from git-scm.com and run it.
- Keep every choice as it is and choose Next until it installs. It includes Git Credential Manager, which signs you in for you later.
Linux: install the git package, for example sudo apt install git.
Restart korAPI after installing, then click the Git bar again.
2. Make an account
Section titled “2. Make an account”Ask your team where the repositories live. Most teams use GitHub or GitLab, or a server of their own. Make an account there if you do not have one. The person who shares the collection gives the others access to it.
3. Let Git sign in
Section titled “3. Let Git sign in”The first time Git talks to the server it needs to know who you are. korAPI cannot type a password for you, so set this up once:
Windows: nothing to do. The first time, a sign-in window from Git Credential Manager opens in your browser. Sign in, and Git remembers it.
macOS and Linux, with GitHub: the easiest way is the GitHub command line tool.
- Install it from cli.github.com.
- In Terminal, type
gh auth login, choose GitHub.com, HTTPS, and Login with a web browser. - Answer Yes when it asks to authenticate Git with your GitHub credentials.
Any server, with an access token: in Terminal, run git ls-remote <the repository URL> once. Git asks for your
username and a password: use an access token from the server’s settings (on GitHub: Settings › Developer settings ›
Personal access tokens), not your account password. macOS keeps it in the Keychain.
SSH keys: if your team uses SSH URLs ([email protected]:your-team/shop-api.git), your key must be added to the
server and loaded in your SSH agent. Connect once in Terminal with ssh -T [email protected] (or your server) and answer
yes, so your computer knows the server.
4. Your name and email
Section titled “4. Your name and email”Git writes a name and an email next to every change, so the team can see who changed what. The first time you send changes, korAPI asks for both (Your name in the history). They are kept for that collection only. Use the email of your account on the server, so your changes show your account.