Git Git For Windows

황제낙엽 2016.08.08 13:51 조회 수 : 367

sitelink1 http://cafe.naver.com/ongameserver/8646 
sitelink2  
sitelink3  

[ Package ]

    •Server
        ◦Cygwin ( http://cygwin.com/ )
            - Openssh
            - Git


    •Client
        ◦Git For Windows ( https://code.google.com/p/msysgit/ )
        ◦TortoiseGit ( https://code.google.com/p/tortoisegit/wiki/Download )
        ◦Git Source Control Provider ( http://visualstudiogallery.msdn.microsoft.com/63a7e40d-4d71-4fbb-a23b-d262124b8f4c )

 

[ Server ]

    1.Cygwin ( Openssh + Git ) 설치 (LocalPackage 방식<=만약 인터넷 연결이 되지 않는 사내 서버인 경우)

    2.SSH 설정
        1.서버 설정 ( ssh-host-config )
        2.Daemon Paramaters 는 ( ntsec tty ) 로 세팅
        3.서버 서비스 시작 ( net start sshd / cygrunsrv --start sshd )

    3.계정 설정
        1.퍼미션 설정
            1.chmod +r /etc/passwd
            2.chmod u+w /etc/passwd
            3.chmod +r /etc/group
            4.chmod 755 /var

        2.Git 사용자 계정을 생성하고 Administrators 그룹 포함 (그렇지 않음, ssh 접속 시 퍼미션 오류 발생)
        3.Windows <-> Cygwin 계정 정보 동기화
            1.mkpasswd -l >/etc/passwd
            2.mkgroup -l >/etc/group


    4.Git 저장소
        1.저장소 생성 ( git --bare init ) - 워킹 데이터가 없는 저장소
        2.저장소 퍼미션 정리

 

[ Client ]

    1.저장소 클론
        ◦방법 : git clone SSH계정@서버주소:저장소_경로 로컬 경로
        ◦예제 : git clone mindsteeper@123.111.222.333:RepoGit/PrototypeServer.git ./

 

[ SourceTree ]

    •Repository 등록 시 ssh 계정 비밀번호를 잘못 입력 했을 경우 로컬에 캐시가 되어 계속 저장소 확인이 실패함
    •해결방법
        ◦(계정정보 삭제) C:\Users\[계정이름]\AppData\Local\Atlassian\SourceTree 의 Password 에서 잘못 캐시된 계정/비번 정보 삭제
        ◦(SSH Key 삭제) 레지스트리에서 해당 장비 IP로 검색해서 "rsa2@IP" 키값을 확인 후 삭제

 

 

[ 참고 사이트 ]

http://redky.blogspot.kr/2010/05/cygwin-git.html

http://blog.naver.com/kwlsgy?Redirect=Log&logNo=70134911597

http://netinamu42.blog.me/70147492822