Github Git remote library connected to the local library
Creating SSH Key
- With a user's home directory
.ssh
->id_rsa
andid_rae.pub
-> skip - If no ->
ssh-keygen -t rsa -C["邮件地址"]
-> Enter the bin - The
id_rsa.pub
copy and paste the contents into theGithub
->Account settings
->SSH Keys
->Add SSH Hey
- With a user's home directory
Adding remote libraries
本地Git仓库
-->远程Github仓库
- Create a new repository on Github ->
Create repository
git remote add [别名][仓库地址]
-> Alias generally origingit remote -v
-> You can view all current remote address aliases- This is about uploading with https way, each will verify the account password, it would be more trouble, you can refer to the following solutions.
Push file
git push [别名][分支名]
Github commit code the user name and password:
Default https: Account: user.email
Password: token
Workaround -> Convert to SSH
1.
git remote -v
Check what way2.
git remote rm origin
remove https ssh way into fashion3. Copy the ssh address.
4.
git remote add origin [复制的地址]
5.
git remote -v
Check whether the change is successful6.
git push origin master
resubmit
Clone file
git clone [远程地址]
- The remotely downloaded to the local library
- Create a remote origin address alias
- Initialize the local library