SSH & Git

SSHBasic Usage

work with git branch

some tips for git setup and git config

git and github

ssh service 

 

GitChinese handbook

GitUsername and mailbox with Github

Q:Why does push still need to enter a username password or pre-configure SSH key after configuring git’s username mailbox?

A:The configured git username and mailbox are different users when distinguishing commit; the input username password or SSH key is to distinguish whether there is push privilege or not. (Sharing a computer by multiple people differentiates the commit of different users, or multiple commit to the company in a distributed environmentThen, from the company server push to GitHub.

1.githubWhen you register, you need to set up github-username, github-email and github-.password ;
2.githubAfter registration, you can set up your own name (nickname) and email, just for external display (and registered github-username (username), github-emailIt doesn't matter.3.The local git needs to set the username and mailbox, which is essentially a variable of the local git client and does not change with the GIT library, but it can also set the username and mailbox separately for a library. Github or code cloud contrib is based on the username and mailbox of the GIT clientUtons statistics show that each commit record uses the GIT client's username and mailbox, so when the client's mailbox, username and GitHub mailbox, username is inconsistent, GitHub will not be able to count contributions, becauseThe user name and mailbox of the client are not real GitHub accounts, so they can not be counted.Conclusion: Git client's username, mailbox and GitHub account's username, mailbox should be set exactly the same./*********************************\
\*********************************/

Related commandsView the username and mailbox command of the current library:Git config user.nameGit config user.emailSets the user name and mailbox of the current library.Git config user.name"xxxxx"
git config user.email "xx@qq.com"

Set the global username and mailbox.Git config--global user.name "xxxxx"
git config --global user.email "xx@qq.com"

 

Leave a Reply

Your email address will not be published. Required fields are marked *