Reference

Case Studies

기본적으로 Repository를 Clone 할 수 있는 URL에는 HTTPS 와 SSH가 있다.

HTTP or HTTPS Permission (Only Private Repository)

➜  git git clone https://github.com/yogiyo/Yogiyo_Web
Cloning into 'Yogiyo_Web'...
Username for 'https://github.com':
 
➜  git git clone https://github.com/yogiyo/Yogiyo_Web
Cloning into 'Yogiyo_Web'...
Username for 'https://github.com': wingsh
Password for 'https://wingsh@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/yogiyo/Yogiyo_Web/'

SSH Key Permission

➜  git git clone git@github.com:atto-test/atto-test.git
Cloning into 'atto-test'...
The authenticity of host 'github.com (192.30.252.130)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

SSH Key 제거 후, 접근 시 https://github.com/yogiyo/Yogiyo_Web/pull/2804#issuecomment-217333654

그러나 Private Repository라도 해당 Repository에 Access 할 수 있다면 Clone 또는 Download ZIP 기능을 사용할 수 있으니 주의해야 한다.

개인이 보안을 강화할 수 있는 방법에는 2단계 인증이 있다.

2단계 인증(Two-Factor authentication)

Github 계정을 가지고 있다면, 개인 계정의 ssh key를 Settings > SSH and GPG keys > SSH keys에 넣으면 되고,

없을 경우엔 Repository > Settings > Deploy keys에 넣으면 된다.

Audit

https://github.com/organizations/atto-test/settings/audit-log

Block users

https://github.com/organizations/atto-test/settings/user_blocks

Permission level for an organization


Owners

Members

Desription

Full administrative access

Customizable access

See all other members

(tick)(tick)
 Create teams(tick)(tick)
 Mention teams(tick)(tick)
 See all teams(tick)(tick)
 See all repositories(tick) (tick)
 Create repositories(tick)(tick)
 Invite new members(tick)(error)
 Access to billing(tick)(error)

Repository permission levels for an organization

Repository actionRead permissionsWrite permissionsAdmin permissionsOwner permissions
Pull (read), push (write), and clone (copy) all repositories in the organization


(tick)
Promote organization members to team maintainer


(tick)
Convert organization members to outside collaborators


(tick)
Create repositories (see "Creating repositories" for details)(tick)(tick)(tick)(tick)
Delete repositories (see "Deleting repositories" for details)

(tick)(tick)
Change a repository's settings (see "Changing repository settings" for details)

(tick)(tick)
Change a repository's visibility

(tick)(tick)
Transfer repositories into, and out of, the organization account

(tick)(tick)
Add a repository to a team (see "Adding a repository to a team" for details)

(tick)(tick)
Add outside collaborators to a repository

(tick)(tick)
Pull from (read) the team's assigned repositories(tick)(tick)(tick)(tick)
Push to (write) the team's assigned repositories
(tick)(tick)(tick)
Fork (copy) the team's assigned repositories(tick)(tick)(tick)(tick)
Send pull requests from forks of the team's assigned repositories(tick)(tick)(tick)(tick)
Merge and close pull requests
(tick)(tick)(tick)
Open issues(tick)(tick)(tick)(tick)
Close, reopen, and assign issues
(tick)(tick)(tick)
Close issues they opened themselves(tick)(tick)(tick)(tick)
Apply labels and milestones
(tick)(tick)(tick)
Have an issue assigned to them(tick)(tick)(tick)(tick)
Create and edit releases
(tick)(tick)(tick)
View draft releases
(tick)(tick)(tick)
View published releases(tick)(tick)(tick)(tick)
Edit and delete their own comments on commits, pull requests, and issues(tick)(tick)(tick)(tick)
Edit and delete anyone's comments on commits, pull requests, and issues
(tick)(tick)(tick)
Edit wikis(tick)(tick)(tick)(tick)
Create statuses
(tick)(tick)(tick)


신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16
git push origin --delete <branchName>


신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16

Webhook will reject

  • Private IPs (10.x, 192.x, etc.)
  • Localhost
  • Hostnames without a Top Level Domain
  • URLs that resolve to localhost or redirects

 

신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16
git config --add remote.origin.fetch '+refs/*:refs/*' git fetch -v

git fetch -v

신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16

How to set up

SMS authentication is not supported.

Korea is not supported countries for SMS Authentication

 

  1. Go to Link https://github.com/settings/security
  2. Click Button "Set up two-factor authentication"
  3. Click Button "Set up using an app"

  4. Install "google OTP" and QR Code applications

    Android app : 바코드 스캐너

    IOS app : Duo Mobile

     

  5. Execute 바코드 스캐너 app and Scan OR Code on Web Site (https://github.com/settings/two_factor_authentication/app)
  6. Enter the 6-digit code and Click Button "Enable"

신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16

 

파라미터 명 

설명

add

인덱스에 파일을 추가한다

> git add doc/*.txt 

bisect

버그를 만들어낸 변화를 이진 탐색으로 검색한다

> git bisect start

 

> git bisect bad

 

> git bisect good v2.6.13-rc2

 

> git bisect visualize

 

> git bisect view --stat

branch

브렌치를 조회, 생성, 삭제한다

> git branch my2.6.14 v2.6.14

 

> git branch -d my2.6.14

checkout

현재 작업중인 브렌치를 인덱스와 일치하도록 원복시킨다

> git checkout master

 

> git checkout hello.c

clone

해당 저장소를 복사해서 새로운 디렉토리에 저장소를 생성한다

> git clone git://unikys.github.com

commit

저장소에 변화를 적용한다

> git commit

 

> git commit -a

diff

commit으로 인한 변화들과 현재 작업하는 브렌치와의 차이를 보여준다

> git diff

 

> git diff HEAD

fetch

다른 저장소로부터 파일들과 레퍼런스들을 다운 받는다

> git fetch origin

grep

패턴과 일치하는 라인을 출력한다.

> git grep  'time_t' -- '*.[ch]'

 init

 빈 git 저장소를 생성하거나 git 저장소를 초기화시킨다

> git init 

 log

 commit한 로그를 표시한다 > git log

 

> git log -3

 

> git log --since="2 weeks ago" -- hello.c

 merge

 2개 이상의 개발 히스토리를 합친다 > git merge origin

 

> git merge --no-commit origin

> git merge fixes_branch patch_branch 

 mv

 파일이나 디렉토리를 이동하거나 이름을 바꾼다

> git mv  hello.c new_hello.c

 pull

 fetch와 merge를 로컬이나 원격의 브렌치에 실시한다

> git pull

 

> git pull origin

 push

 원격의 레퍼런스를 업데이트한다

> git push public

 

> git push origin

 

> git push origin master

 rebase

 로컬 commit들을 자동으로 head로 업데이트하도록 설정한다

> git rebase master

 

> git rebase master myBranch

 reset

 현재 head를 특정 상태로 재설정한다

> git rebase master

 

> git rebase master myBranch

 rm

 현재 브렌치와 인덱스에서 파일을 삭제한다

> git rm doc/\*.txt

 show

 다양한 객체들을 보여준다

> git show v1.0.0

> git show master:Makefile

 status

 현재 작업중인 브렌치의 상태를 보여준다

> git status 

 tag

 GPG(GnuPG)로 객체에 태그를 생성/조회/삭제/검증을 한다

> git tag -a new_tag

 

 

 

 

 

 

 

신고

'Infra > (SCM) Git' 카테고리의 다른 글

Github Security  (0) 2016.07.11
how to delete git remote branch  (0) 2016.04.28
Webhook  (0) 2016.04.25
Git bare repository sync  (0) 2016.04.19
Two-factor authentication on Github  (0) 2016.03.30
Git Basic Command  (0) 2014.09.16

+ Recent posts

티스토리 툴바