설치방법

먼저 GitHub에 가입이 되어있어야 하고, Sublime Text 2 에는 Package Contorl 이 설치되어 있어야한다.

이제 Sublime Text 2 에서 gist를 설치하고 계정을 설정하면 된다.

 



설치가 완료되면 Perferences - Package Settings - Gist - Settings User 를 클릭하고 GitHub 계정을 저장한다.



아래와 같이 계정 아이디와 패스워드 토큰을 입력한다.

{
	// Github user ID
	"username" : "id",
	// Gitjub password
	"password" : "pw",
	// Your Github API token
	"token" : "token"
}

토큰을 생성하는 방법은 GitHub 홈페이지에서 로그인한 후 Account settings - Applications 에서 Personal access tokens 옆에 Generate new token 으로 생성한다.



사용방법

업로드하기

다음과 같은 코드를 작성한뒤 gist에 Ctrl+Shift+P 를 입력하고 Gist: Create Public Gist 를 선택한다.

그리고 하단에 입력창이 보이는데 첫 번째 파일 설명과, 두 번째 파일명을 입력하면 파일이 업로드된다.

단축키 Ctrl+K, I(순서대로 K와 I를 입력해야한다.)를 이용하면 훨씬 빠르게 사용할 수 있다.





불러오기

Ctrl+k,o 마찬가지로 단축키를 이용할 수 있다.




업데이트하기

Gist: Update File 로 업데이트 한다. 마찬가지로 단축키 Ctrl+K, S 가 있다.






문제점

'git clone' 명령어 실행시 에러 발생

fatal: could not read Username for 'http://github.com': No such file or directory



해결방안

황당한 문제이다. 대소문자를 구분하는 것.

주소는 작성하다가 opidHub를 opidhub로 작성했던 것이다.

앞으로 대소문자 구분을 확실히 해야겠다.


문제점

$ git push 를 사용하니 다음과 같은 경고가 발생하였다.

warning: push.default is unset; its implicit value is changing in

Get 2.0 from 'matching' to 'simple'. To squelch this message

and maintain the current behavior after the default changes, use:

    git config -- global  push.default matching

To squelch this message and adopt the new behavior now, use:

    git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.

(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode

'current' instead of 'simple' if you sometimes use older versions of Git)

fatal: colud not read Username for 'https://github.com': No such file or directory


해결방안

Git 2.0 부터는 git push의 기본 동작이 matching에서 simple로 바뀌었다는 경고이다. 이 경고를 나오지 않게 하려면 

git config --global push.default matching 혹은 git config --global push.default simple 을 실행하면 된다.

matching은 동일한 이름을 가진 모든 branch를 push한다. 두 end를 늘 동일한 상태로 유지하고자 할 때 사용된다. 여럿이 사용하는 환경에는 부적합하다.

simple은 현재 작업중인 branch만 push한다.


위 사진에서 경고는 사라졌지만 다른 문제점도 찾아봐야겠다.

참고1참고2참고3 


문제점

Window git에서 unable to access ... Protocol https not supported or disabled in libcurl 오류 발생



해결방안

 libcurl 버전이 맞지 않아 발생 or 중복되어서 에러 발생

C:\Windows\SysWOW64\libcurl.dll 삭제.

(혹시 모를 상황을 대비해 백업해두기로 한다.)








 GitHub란?

기트허브(GitHub, /'ɡɪtˌhʌb/)는 Git를 사용하는 프로젝트를 지원하는 웹 기반의 호스팅 서비스이다. 루비 온 레일스로 작성되었다. GitHub는 영리적인 서비스와 오픈소스를 위한 무상 서비스를 모두 제공한다. 2009년의 Git 사용자 조사에 따르면 GitHub는 가장 인기있는 Git 호스팅 사이트이다. 또한 2011년의 조사에서는 가장 인기있는 오픈 소스 코드 저장소로 꼽혔다.

GitHub는 pastebin과 유사한 서비스와 위키를 각 저장소마다 운영하고 있으며 git 저장소를 통해 고칠 수 있다.

2010년 1월부터 GitHub는 GitHub, Inc. 라는 이름으로 운영되고 있다.

위키백과


 GitHub 홈페이지

GitHub 간편 안내서


+ Recent posts