Home >Development Tools >git >How to configure local account and password on gitee (steps)
Before using Gitee for code hosting and team collaboration, you need to configure a local account and password. The following are the specific steps:
git config --global user.name "你的Gitee用户名" git config --global user.email "你的Gitee注册邮箱" git config --global credential.helper store
The third line of command is to save the local username and password to avoid having to enter them every time. If you do not add this command, you will need to enter your account and password during each push and pull operation.
ssh-keygen -t rsa -C "你的Gitee邮箱"
At this time, It is required to enter the SSH key storage path. You can directly press "Enter" to use the default path. You will then be asked to enter a password, you can also press the "Enter" key to skip it.
cat ~/.ssh/id_rsa.pub | pbcopy
The above command is to copy the contents of the id_rsa.pub file to the pasteboard and wait for the next step to paste.
ssh git@gitee.com
If "Hi XXX! You've successfully authenticated, but Gitee.com does not provide shell access." appears, the configuration is complete. Now you You can freely use Gitee to host your own code.
It should be noted that the above steps are for push and pull operations from the local code base to Gitee. If you need to clone the local code base from Gitee, you need to configure the "SSH public key" in Gitee. .
The above is the detailed content of How to configure local account and password on gitee (steps). For more information, please follow other related articles on the PHP Chinese website!