For the open-source hosting site GitHub Everyone should be familiar with it, has been set up in GitHub above the SSH public key, there has been no problem, today encountered a problem: Git also push code to two remote repositories. So I built two test remote warehouses on GitHub and OSC, but I didn't use the OSC very often, so I had the SSH public key configured once, but when I committed it ' refused to commit '. Do not think, I try to ' ssh-t [email protected] ', the result ' welcome ', clone can also, finally found that I set the project deployment public key! Sweat!!!!
Make a note here:
Osc
1. There is an SSH public key in your profile,
2. There is a deployment public key management in each of your projects (the machine that deploys the public key configuration, only supports read-only operations such as clone and pull.).
GitHub
The following two roles and above are the corresponding
1. SSH keys
2. Deploy keys
Summarize
The first public key is equivalent to setting administrator permissions, you can clone, pull, "push"
The second is the project public key, only allowed for security reasons, clone and pull
So if you want to push the time code to the remote library without the password, then set the public key to the first
Project public key and administrative public key in OSC and GitHub