Use a Personal Access Token
remote: Use a Personal Access Token as your password, not your account password - git over HTTPS refused the account password.
Use a Personal Access Token
Symptom
remote: Use a Personal Access Token as your password, not your account password. Create one under Settings -> Tokens. Setup guide: https://docs.git.eu/guides/git-client-setup.html
fatal: unable to access 'https://<INSTANCE>.git.eu/<USERNAME>/<REPO>.git/': The requested URL returned error: 403
Cause
git over HTTPS never takes your account password. The password field must hold a personal access token (it starts with giteu_) or an OAuth token from a credential helper.
- You typed your account password at the prompt.
- A credential helper stored your account password, or a token from another site, and sends it again.
- The value is not in the
giteu_token form (cut while copying, extra characters).
The username is not checked: the token alone identifies you.
Diagnose
1. Check which credential helpers git uses:
git config --get-all credential.helper
2. Show what git would send for the instance. The output holds the secret in clear text, so run it only on your own screen:
printf 'protocol=https\nhost=<INSTANCE>.git.eu\n\n' | git credential fill
A password= value that does not start with giteu_ is not a personal access token.
Fix
Option A - Use a personal access token (recommended)
Create a token in Settings → Git Access → Tokens with the Git access scope, and copy it: it is shown once.
git does not drop a stored credential after a 403: every command sends the same value again and fails the same way. Remove it from every configured helper (store, an OS keychain, Git Credential Manager):
printf 'protocol=https\nhost=<INSTANCE>.git.eu\n\n' | git credential reject
The next git command asks for a username and password: paste the token as the password.
Option B - Use the OAuth credential helper
For daily use on your own machine, the OAuth helper signs you in through the browser and needs no token: see Git Access (OAuth-PAT).
Verify
git ls-remote https://<INSTANCE>.git.eu/<USERNAME>/<REPO>.git
It lists the branches and tags of the repository.
Prevent
- Store tokens, never your account password, in a credential helper.
- In scripts and CI, read the token from a secret variable.