2014-04-21 2 views
0

https://github.com/gitlabhq/gitlab-recipes/tree/master/install/centos마다 GitLab을 설치했습니다.GitLab의 비밀번호

지침 상태는 사용자가 "자식"

adduser --system --shell /sbin/nologin --comment 'GitLab' --create-home --home-dir /home/git/ git 

모든 일 듯를 추가 할 수 있습니다. 나는 다음 GitLab 서버에 프로젝트를 추가하고, 그것에 밀어 지시했다 :

cd existing_git_repo 
git remote add origin [email protected]:root/bidjunction.git 
git push -u origin master 

내가 다음 내 고객에 가서 자식 서버로 밀어합니다.

[[email protected] bidjunction]$ git push -u origin master 
The authenticity of host 'mysite.com (123.456.789.01)' can't be established. 
RSA key fingerprint is cd:32:3c:5a:4e:33:44:11:df:ee:3s:4b:3a:c2:a4:c2. 
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added 'mysite.com,123.456.789.01' (RSA) to the list of known hosts. 
Address 123.456.789.01 maps to ve6.phpwebhosting.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! 
[email protected]'s password: 

암호가 있어야합니까? 아마도 그렇지 않을 것이고, 지침은 다루지 않습니다.

읽는 중 System ask password when push project to github으로 표시되면 SSH와 관련이있는 것으로 보입니다.

GitLab은 SSH 키를 추가하기 위해 다음 지침을 제공합니다. 나는 그들을 따라 갔고, 서버의 일반 사용자의 집에 키를 추가했다. 변경 없음. 그런 다음 root에서 로깅을 시도하고 git의 집에 키를 추가했습니다. 아직 아무도 없지만 클라이언트에 이미 내 일반 사용자의 키가 있다고 생각하고 있으므로 새로운 git 키를 가져 오지 않습니다.

EDIT. 제 리눅스 클라이언트가 아닌 GitLab 서버에이 키들을 추가해야하는지 확인하십시오.

모든 도움을 주시면 매우 감사하겠습니다.

SSH Keys 

SSH key allows you to establish a secure connection between your computer and GitLab 

Before generating an SSH key, check if your system already has one by running cat ~/.ssh/id_rsa.pub If your see a long string starting with ssh-rsa or ssh-dsa, you can skip the ssh-keygen step. 

To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default. It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. Note that the password you choose here can't be altered or retrieved. 

ssh-keygen -t rsa -C "$your_email" 

Use the code below to show your public key. 

cat ~/.ssh/id_rsa.pub 

Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with ssh- and ending with your username and host. 

편집 2

내가 혼란, 그리고 GitLab의 서버 id_rsa.pub를 사용 같은데. 맞춰 볼 필요가 없다고 생각하세요! 나는 이후 수정했지만, 지금은이 오류를 얻을 :

[[email protected] ~]$ ssh [email protected] 
Address 123.456.789.01 maps to ve6.phpwebhosting.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT! 
PTY allocation request failed on channel 0 
This account is currently not available. 
             Connection to mysite.com closed. 
[[email protected] ~]$ 

답변

1

는 SELinux를 사용 권한 문제처럼 보인다 글로벌 설정 사용자 이름과 이메일을 설정해야합니다 생각합니다. 단계는 다음과 같이하십시오 restorecon -R -v /home/git/.ssh

  • usermod -s /bin/bash git
  • 편집

    1. 같은 당신의 집 컴퓨터 사용자의 .ssh/config :
    Host mysite.com 
        User gitlab_username 
        Hostname mysite.com 
        PreferredAuthentications publickey 
        IdentityFile /home/user/.ssh/id_rsa 
    

    가 gitlab 서버 ssh -T [email protected]에 연결하려고합니다. 당신을 환영하는 메시지가 보일 것입니다.

    설치 가이드에 추가했습니다. 몇 가지 향상된 기능으로 merge request을 준비했습니다. gitlab 6.8이 릴리스 될 때 나는 그것을 병합 할 것이다.

  • +0

    감사 액슬. 현재 SELinux는 허용 모드입니다. 제 원래 게시물의 편집 2를 참조하십시오.생각? 제안대로 .ssh/config를 변경했습니다. GitLab 서버가 아닌 클라이언트에게이 작업을 수행하십시오. '잘못된 소유자 또는/home/Michael/.ssh/config'에 대한 사용 권한을 얻었습니다. 어떤 사용자를 사용해야합니까? 젠장? 제 의뢰인입니까? 고맙습니다! – user1032531

    +0

    맞습니다. gitlab에 로그인 할 때 사용자를 사용해야합니다. CentOS btw에 대한 업데이트 된 가이드가 있습니다. – axil

    +0

    감사합니다. Axil, 나는 업데이트 된 가이드를 따라 시작하고 무슨 일이 일어나는 지 봅니다. 내가 얼마나 멀리 뒤로 가야한다고 생각합니까? (즉, 나는 무엇인가 'yum remove any')해야합니까? 또한 Apache에서 권장하는 방법과 다르게 Apache를 구성했습니다. http://stackoverflow.com/questions/23227851/configuring-apache-on-centos-for-gitlab을 참조하십시오. 감사합니다. – user1032531

    0

    난 당신이

    $ git config --global user.name "John Doe" 
    $ git config --global user.email [email protected] 
    
    +0

    감사합니다. SnareHanger. 예, 저는 이미 그렇게했습니다. – user1032531

    -1

    git 사용자가 지정한대로 로그인 쉘이 없는지 확인하십시오. 내 문제가 해결 된 제안으로 bash로 변경 (usermod -s /bin/bash git).

    관련 문제