For example, if you’re using the Git CLI, enter the following
git clone
command. You'll be prompted to enter your
username and password. When prompted for your password, enter your personal
access token instead of a password.
git clone https://myinstance.com/organization_name>/s/<project_name>/scm/<repo_name>.git
Username: YOUR_USERNAME
Password: YOUR_PERSONAL_ACCESS_TOKEN
You could also enter a command like this, using the username and
token in a git clone
command with this format:
git clone https://<username>:<personal_access_token>@https://myinstance.com/organization_name>/s/<project_name>/scm/<repo_name>.git
You could even enter a command like this, using just the token in
a git clone
command with this format:
git clone https://<personal_access_token>@https://myinstance.com/organization_name>/s/<project_name>/scm/<repo_name>.git
Tip:
Use <username>:<personal_access_token>
if the
specified user owns the token. If the user doesn't own the token, an
Auth error will be encountered.
Use just <personal_access_token>
when the user is
the one who owns the token.