ssh/id_rsa_remote_git.pub | ssh _SERVER_IP "cat > ~/.ssh/authorized_keys" pub file to VPS and import it into authorized_keys:cat. Mkdir ~/.ssh & touch ~/.ssh/authorized_keys We will need to create authorized_keys firstsu git Add your local generated SSH key to the access list of the git user.Then, setup a git user on remote server:useradd git.First, setup git environment for the server:yum install -y git. ![]() Install Git server on remote CentOS server The public key will be uploaded to the remote server for allowing ssh access from this user later. It is suggested to type a password (PASS1 for example) for this key-pair for more security purpose.Īt the end of this step, you will have 2 files, one is a private key and one is public key (.pub file). Just enter the full path of the generated key. From your local Mac/Linux PC (Windows? Use PuTTYgen), create a key-pair using ssh-keygen as follows: Create the SSH Key Pairįirst, we need to create SSH key pair for remote access. So this tutorial guides how to setup a private git server on Linux server (CentOS in this tut). ![]() ![]() It means that your source code of an important project will also be available for your competitors one day. GitHub is a well-known git repository, but one limit is that it is not free for private git repository (cost $7/month this posting time). This entry was posted in PHP and tagged private git server on Maby NhocConan
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |