How to git clone via https with personal access token in private project?

I try to git clone from my private-project on to local env.
but authentication failed.

NG case below:


https://<my-user-id>:<my-password><my-account>/<my-project-name>.git<my-account>/<my-project-name>.git?personal_access_token=<my token>

result copy:

C:\Users\<my-win-account>> git clone<my-account>/<my-project>.git/
Cloning into '<my-project>'...
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for '': <my-account>
Password for 'https://<my-account>':
remote: HTTP Basic: Access denied
fatal: Authentication failed for '<my-account>/<my-project>.git/'

my env below:

Windows credential manager’s info was cleared already.

2FA disable/enable is no effect.

readed doc

I read below link, but i can’t find a example for how to clone command line.

Hi @KazYag,

You may want to check this issue note to find help

Best Regards,
Łukasz Korbasiewicz
Support Engineer
GitLab, Inc.

Thanks for your res.

Solution is this below.

  • step1. upgrade git for windows(>=2.14) (*all option is default)
  • step2. git config --global http.sslBackend schannel type in git bash(or git CMD)
  • step3. https://<my-user-id>:<my-pat><my-account>/<my-project-name>.git type in git bash(or git CMD)

My env is under “forward authenticated proxy” for enterprise user.
so, error message is Authentication error, but it’s SSL Certificatite error.

already I tryed to fix ssl error like ssl.verify=false, sslcainfo=some-path/for/ca.
but It’s no efffect.

git config --global http.sslBackend schannel is only solution.
(CA Cert of Proxy is already installed in windows env.)


git proxy config is below:

$ git config --global http.proxy http://<username if neccesary>:<password if neccesary>@<your-proxy-hosts>:
<port number if neccesary>
$ git config --global https.proxy http://<username if neccesary>:<password if neccesary>@<your-proxy-hosts>:
<port number if neccesary>