git clone 403 er

Problem
description

The result of executing git clone [url] is as follows:

Cloning into 'git'...

remote: Coding.net Tips : [Permission denied!]

fatal: unable to access 'https://git.coding.net/xxxxx/ git/': The requested URL returned error: 403 The

problem is caused
by git having cached the wrong account and password. In the

https method, you need to enter the password every time. You can enter the password once according to the following settings, without the trouble of manually entering the password and enjoy https Bring the speed

Set remember password (default 15 minutes):

git config --global credential.helper cache

If you want to set the time yourself, you can do this:

git config credential.helper 'cache --timeout=3600'This

will set a Expires after hours

Long-term storage password:

git config --global credential.helper store



Solution
1. http://username:[email protected]/name/project.git This allows the current operation to use the entered username and password login

2. Run the command: rm ~/.git-credentials, delete the account and password saved by git config --global credential.helper store. Go back to entering username and password each time.

Reference link: https://www.jianshu.com/p/c62239b377f2

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325340449&siteId=291194637