Search notes:

Git: Cloning a repository with the Personal Access Token in the URL

When cloning a repository from a Git server that requires a Personal Access Token (PAT) for authentication (such as for example github), the PAT can be included in the URL:
$ git clone https://ghp_ThisIsThePersonalAccessTokenxxxxxxxx@github.com/username/reponame
When doing that, the PAT will then be stored in the repository's config file .git/config (see this link). This might or might not be what the user intended.
However the case, it allows the to push, pull or fetch without involving a credential helper.

Index