-
Notifications
You must be signed in to change notification settings - Fork 0
Authentication
English · 한국어
How to log in to GitHub/GitLab for Push and Pull operations. You only set this up once—after that, it's automatic!
In the past, you could log in with your GitHub password. But starting in 2021, GitHub stopped allowing password authentication. Instead, GitHub now requires Personal Access Tokens (PAT).
A token is a long, unique string of characters that acts like a temporary password. Here's why it's better:
- More secure than a password (you can set it to expire, limit its permissions)
- No password reset needed if compromised—just delete the token
- Limited scope—can be restricted to Git operations only (not your whole account)
- Go to github.com in your browser.
- Click your profile icon (circular image) in the top right.
- Select "Settings".
- Scroll down the left sidebar menu to find "Developer settings". Click it.
- In the left menu again, select "Personal access tokens" → "Tokens (classic)".
Note: There's also a newer "Fine-grained tokens" option, but "Tokens (classic)" is simpler for beginners.
-
Click the "Generate new token" button in the top right → "Generate new token (classic)".
-
Enter a name for the token:
Examples: GitTab, GitTab-on-Windows -
Choose an "Expiration" date:
- No expiration: Never expires (convenient, but less secure) - 30 days, 60 days, 90 days, 1 year: Auto-expires (more secure)For your first token, "90 days" is a good choice. You can create a new one when it expires.
-
Under "Select scopes", check these boxes:
✓ repo (full access to repositories) ✓ read:user (read user information) ✓ gist (access to Gists — optional)At minimum, you must check
repo. -
Scroll to the bottom and click "Generate token".
Your token is now displayed. Once you leave this page, you won't see it again!
- Click the 📋 copy button next to the token.
- Or select the entire token and press
Ctrl+C.
⚠️ Never share this with anyone! Treat it like a password.
- In Git Tab, click "Push" or "Pull".
- If you need network access, an authentication dialog will appear.
In the dialog box, enter:
Username: your_github_username
Token: ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxx (the one you copied above)
-
Username: Your GitHub account name (e.g.,
john_doe) - Token: The long string you copied earlier
Click "OK" or "Sign In".
Your credentials are securely saved in Windows Credential Manager.
From now on:
- Push/Pull automatically uses your credentials.
- You won't need to type them again.
- Modify a file and commit it.
- Click the "Push" button.
- After a moment, you should see a success message.
- Go to
github.com/your_username/repository_namein your browser and verify the commit appears.
- Edit a file directly on GitHub's website.
- Enter a commit message and click "Commit".
- Back in Git Tab, click "Pull".
- The file automatically updates.
- Open Windows Search (🔍) and search for "Credential".
- Open the "Credential Manager" app.
- Click the "Windows Credentials" tab.
- You'll see GitHub-related entries listed.
- Click the entry you want to remove.
- Click "Remove".
- The next time you Push/Pull, you'll be prompted to enter credentials again.
- Open Git Tab's ⚙ Settings.
- Find the "Authentication" section.
- Click "Clear Saved Credentials". This removes credentials for the currently open repository.
- The next Push/Pull will prompt you again.
Push/Pull fails with:
error: authentication failed
-
Create a new token on GitHub (follow Step 1 again).
-
Delete the old token from Credential Manager (follow the "Delete" section above).
-
Try Push/Pull in Git Tab again.
-
Enter your new token when prompted.
The process is the same for other Git hosting services.
-
Log in to gitlab.com.
-
Click your profile icon (top right) → "Edit profile" → "Access tokens".
-
Click "Add new token".
-
Enter a token name and check these permissions:
apiread_repositorywrite_repository
-
Click "Create personal access token".
-
Copy the token.
-
In Git Tab, when you Push/Pull:
- Username: Your GitLab username or email
- Token: Your GitLab token
A: No problem! Just create a new one. Log in to GitHub, go to Personal Access Tokens, and generate a fresh token. The old one is deleted automatically and can't be used.
A: Git Tab stores credentials per host (e.g., github.com). To switch accounts:
- Use ⚙ Settings → "Clear Saved Credentials" to delete the old account.
- Next Push/Pull, enter the new account's username and token.
- Or manually edit entries in Windows Credential Manager.
A: Same process! The only difference is your GitHub URL is your company domain (e.g., github.company.com) instead of github.com.
A: Go to GitHub Settings → Developer settings → Personal access tokens, find the token, and click delete. That token is now useless and can't be used anywhere.
- Learn how to Push/Pull: Check the Features page.
- Troubleshooting: If you hit any issues, see the Troubleshooting page.