32
Git Sitdhibong Laokok<[email protected]>

Git installation

Embed Size (px)

Citation preview

GitSitdhibong Laokok<[email protected]>

/ɡɪt/—Linus Trovalds

Installation

Linux• Debian/Ubuntu

$ apt-get install git

• Fedora

$ yum install git

• FreeBSD

$ cd /usr/ports/devel/git && make install

OS X

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

$ brew install git && brew link git

Windows ?

AuthenticationCommand alert (Optional)

Key generation

Linux & OS X

$ mkdir ~/.ssh || cd ~/.ssh

$ ssh-keygen [-b x1024] [-C “Some comment”] \[-f file_name]

Windows

เปิดหน้าต่าง Command Prompt ตามด้วยคำสั่ง

$ setx HOME “%userprofile%”

$ setx GIT_HOME “c:\Program Files\Git”

$ setx PATH “%PATH%;%GIT_HOME%\usr\bin”

ปิดหน้าต่าง Command Prompt

Windows

เปิดหน้าหน้า Command prompt ใหม่อีกครั้ง

$ cd %HOME%

$ mkdir .ssh && cd .ssh

$ ssh-keygen [-b x1024] [-C “Some comment”] \[-f file_name]

Key setup

Configuration file

$ vim ~/.ssh/config

Host 203.185.132.59

HostName 203.185.132.59

User (Your_User_Name)

IdentityFile (file_name)

Test key

$ ssh -T [email protected]

The authenticity of …..

… . . (yes/no)

Welcome to GitLab, <Your_real_name>!