The last part of the series of git, let's look at how to view a remote repository.
Entry
git remote -v
We can also delete a remote database, enter
git remote remove origin
After deleting the query again, the information is empty.
Attention, this does not put the remote repository is really deleted, so just delete the alias address of the remote database.
We re-add a remote tag library, enter
git remote add origin https://gitee.com/blizzawang/lianshou.git
Then we push it.
git push origin master
These would have said before.
Some people may find themselves pushed each time are required to enter a user name and password, feeling very uncomfortable, now, let's learn how to configure the public in order to avoid dense login.
If you wish so, our address should be replaced, because it is not HTTPS port 443 to go, so we address around the city ssh address.
The address within the red border copy, and then enter the command console in git
git remote remove origin
git remote add origin [email protected]:blizzawang/lianshou.git
In this way, we would add the complete address.
Next, we need to configure a public key.
$ ssh-keygen -t rsa -C config ****@qq.com
Enter the back of your mailbox.
Middle do not lose anything, all the way round, then, git will help you to save information to the C: /Users/blizzawang/.ssh/id_rsa.pub
we can go to the directory to find.
Then copy the contents of the file, and then to the web page.
Click here to fill free to the public key title, then just copy and paste content directly in the end, the click OK. Enter the user about the password, so public it done! After you submit content, you do not need to enter a user name and password.