IOS Learning-git version migration

Source: Internet
Author: User

1. Add a user to the new address and create a fileOpen new AddressSSH User name@ IPPassword:xxxxsudo adduser asamuKnock three times.Enterthen enterN, indicate no password, fill in some details below (optional), enteryGo on?su AsamuSwitch users,Cd/homeYou can see that the user folder has been built. 2. Add SSH key to the root user. SSH inside1). Create. ssh/Authorized_keys Cd/home/gitmkdir. SSHchmod. SSHtouch. ssh/Authorized_keys
chmod. Ssh/authorized_keys 2). Enter Authorized_keys CD. SSHvim Authorized_keys Copy the required SSH keyand press ESC to enter : Wq exit, copy it in.  3. Build an empty repository, the GIT repository on the server usually ends with a. Git and then changes the repository owner to gitCd/homemkdir Asamuchown git:git AsamuCD Asamugit init-bare xxx.gitchown-r git:git xxx.git4. Delete the old address, plus the new addressgit remote Remove Origingit remote add Origin [New.git]git push-u Origin master//Do not submit the branch/trunk separately Tips: rm-r xxx //delete files, delete user same applies ls-a //view hidden files   problems that you may encounter1. Each timeClone/push ...Requires a password because the userSSH KeyDid not add in 2.CDCan't get in.. SSHMaybe because the user does not have permissions,su RootTry it, orsudo suTry it again.sudoThe problem

IOS Learning-git version migration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.