Warning: session_start(): Session cannot be started after headers have already been sent in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 6

Deprecated: Optional parameter $post_id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 54

Deprecated: Optional parameter $value declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 166

Deprecated: Optional parameter $post_id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 166

Deprecated: Optional parameter $key declared before required parameter $value is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/ajax/class-acf-ajax.php on line 76

Notice: Function register_sidebar được gọi không chính xác. Không có đối số id cho sidebar "Right Sidebar". Mặc định là "sidebar-1". Hãy đặt id là "sidebar-1" để tắt thông báo này và giữ nội dung hiện tại của sidebar. Vui lòng xem Hướng dẫn Debug trong WordPress để biết thêm thông tin. (Thông điệp này đã được thêm vào trong phiên bản 4.2.0.) in /home/onetcomvn/public_html/wp-includes/functions.php on line 6031

Warning: Undefined array key "ac" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 796

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-repeater.php on line 720

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-repeater.php on line 786

Deprecated: Optional parameter $name declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1038

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1074

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1126

Deprecated: Optional parameter $id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-gallery.php on line 296

Warning: Constant WP_MEMORY_LIMIT already defined in /home/onetcomvn/public_html/wp-config.php on line 102
SSH Key Setup for GitHub Onet IDC

SSH Key Setup for GitHub

29/12/2020

Notice: Only variables should be assigned by reference in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 732
Git
To understand Github you first need to make sure you are aware of a Git . Git is a open source version control system that was started by Linus Trovalds. In short Git is a version control system like Subversion and CVS. You will be able to use this by installing “git” command and utilities in your server. Git is a command-line tool, and GitHub is the place where developers store their projects and works and will be able to share with the rest of the world and can give them version upgrades as well. You have options to create private and public repositories and can use them as per your needs.

To start with you need to make sure you have a linux terminal with git command installed and have ability of using git command by the user at which you are trying. Always try to use a separate user and do not use root user for the same. Also you need to create a account with Github.

Create an Account with Github

To create a account with Github, you can follow the below steps

  • Go to “Join GitHub”
  • Fill in your information and click “Create an account”
  • Select the plan you want and click “Finish sign up”
  • When you sign up, you’ll receive an email to verify your email address.  Click the link to complete verification.

Once account is created next step is to create a fresh key pair and then add them to Github.

Adding Your SSH Key to Your GitHub Account

Login to your terminal via SSH.

Generate a key pair by running the following command, substituting in your GitHub email address between the quotes:

# ssh-keygen -t rsa -b 4096 -C “your_email@domain.com”

When you’re prompted to “Enter a file in which to save the key,” press Enter to save it in the default location. If you wish to use a different location, you can provide the path to be used here as well.

At the prompt, type a secure passphrase that will be used when your key is authenticating, and confirm it. You can even do not setup this passphrase if you don’t need extra verification. So now you have generated the SSH key pair. Make sure you make a note on things like public key and private key files.

To add ssh key in the GitHub you need to take a copy of the public key and you can use the below ssh command to get this done.

# cat /home/user/.ssh/id_rsa.pub

Once you have copied the content in your clipboard or in any local text file, we can use the below steps to add the key to Github account.

  • You need to login to Github Account using your user/pass
  • Click on the Profile pic and select “Settings” from the Drop down.
  • Select “SSH and GPG Keys” from the Menu in the left hand side

To add your first key or another key click on “New SSH key”

In the “Title” field, you need to add a label which you can remember.  (I used  “Sumesh’s MacBook Air”).

You can use any word and only thing you need to take care is you need to make sure that will help you to identify the machine on which that key is generated.

In “key” Field add the above key which you get by using the command “cat /home/user/.ssh/id_rsa.pub” which will start with ssh-rsa

  • Click Add SSH key.

If prompted, confirm your GitHub password which will be used for verification.

Now you can see the key listed which you have added in the title name. And you will need to do the same procedure for each computer , live servers dev/staging servers which needs to access your repositories.

Check your Connection from local machine to Github

Open a new ssh terminal and make sure you switch to the user for which you had created the ssh key pair. To connect with Github account via ssh key, you need to type the below and press enter

# ssh -T [email protected]

If you connecting this for the first time from that machine, you will see a result like the below and you need to type Yes in this case:

The authenticity of host ‘github.com (192.30.1.1)’ can’t be established.
RSA key fingerprint is SHA256:asdnasd871321312kjaksjdasdijsaidjsad1Rk3ndm.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,192.30.30.1’ (RSA) to the list of known hosts.
  • Type “yes”
  • Press Enter

You will see output like this:

“Hi user ! You’ve successfully authenticated, but GitHub does not provide shell access.”

If the above mentioned user is correct and is displayed as the same one which you tried adding, then all is fine and you have completed the ssh key setup with Github ! If you are getting permission denied, then we need to cross check the above steps and make sure you have done everything as per the above doc.  You can always contact me if you need any help in this case.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Configure Git Server with SSH on Ubuntu


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
If you have a small number of team members working on some projects, then you can setup a Git server via SSH on your office...
29/12/2020

How to Use Git Tags to Improve Your Development Processes


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
For most development teams, Git has become an essential tool for version control. A big reason for Git’s popularity is...
29/12/2020

SSH Key Setup for GitHub


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
To understand Github you first need to make sure you are aware of a Git . Git is a open source version control system that...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch vụ thuê mua proxy US UK uy tín, chất lượng số #1
13/05/2024

Thuê mua proxy Việt Nam: Báo giá & các thông tin MỚI NHẤT
13/05/2024

Dịch vụ thuê mua proxy giá rẻ an toàn, tốc độ cao
13/05/2024

Thuê mua proxy V6 uy tín, chất lượng tại đâu?
11/05/2024

Thuê mua proxy Tiktok tăng doanh thu, hiệu quả cao
11/05/2024