Using Git Personal Access Tokens (PATs) is a secure and convenient way to authenticate with Git service providers.
Having used SCM plugins for quite sometime, I thought - WHY I have never used them to clone a repository and while I employ the personal access token (NOW)- The weapon of choice, I have never tried it myself.
In case you are still using the basic/auth it is time to move to personal access token.
Official documentation is the best guide. Personal access tokens (PATs) are an alternative to using passwords for authentication to GitHub Enterprise Server when using the GitHub API or the command line.