bitnamiãé
å¸ãã¦ãä»®æ³ãã·ã³ã¤ã¡ã¼ã¸ã使ãã°ç°¡åã«Gitlabãµã¼ããç«ã¦ãããï¼ã¨æã£ããå
¨ç¶ãããªãã¨ãªãã£ãã®ã§å°å
¥æé ã®ã¡ã¢ãä½ã£ãã
çµæ§ã¯ã¾ãã©ããããã£ã¦ããã©ãã£ãããããã¯æä½æ¥ã§ã¤ã³ã¹ãã¼ã«ããæ¹ãããããããããã
GitLab Cloud Hosting, GitLab Hosting - Installers and VM
ã»virtual boxã§ubuntu64bitä»®æ³ãã·ã³ãèµ·åããã
ãã¹ãã¬ã¼ã¸ã¯bitnami-gitlab-6.3.0-0-ubuntu-12.04.vmdk
ãè¨å®ï¼ãããã¯ã¼ã¯ã§ä»¥ä¸ãè¨å®ã
ãå²ãå½ã¦ï¼NAT
ããã¼ããã©ã¯ã¼ãã£ã³ã°ï¼
ãã9090(ãã¹ã)ï¼80(ã²ã¹ã)
ãã3000(ãã¹ã)ï¼3000(ã²ã¹ã)
ãã2222(ãã¹ã)ï¼22(ã²ã¹ã)
ã»ãã¼ãã¼ãé
åãæ¥æ¬èªã«ãããä¸åº¦å®è¡ããã¨ãã°ã¢ã¦ãã»åãã°ã¤ã³ãã¦ãæå¹ã«ãªã£ã¦ãããããã·ã³ãåèµ·åããã¨ç¡å¹ã«ãªãã®ã§èµ·åã¹ã¯ãªããã«ä»è¾¼ãã
ãsudo loadkeys jp
ã»sshdãèµ·åãã
ãsudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
ãsudo start ssh
ãhttp://wiki.bitnami.com/Virtual_Appliances_Quick_Start_Guide#How_to_enable_sshd.3f
ã»/etc/ssh/sshd_configã®ä»¥ä¸ãç·¨é
ãPermitUserEnvironment yes #=>ãããnoã«ãã
ã»ããã¾ã§ã§å¤é¨ããã®SSHæ¥ç¶ãå¯è½ã«ãªãã®ã§æ¥ç¶ã確èªããã
ããã ãããã¹ã¯ã¼ãã«æ°åãå
¥ã£ã¦ããã¨ãªããPermission deniedã«ãªãã®ã§æ³¨æã
ããã以éã¯CyberDuckã¨CotEditorã使ã£ã¦è¨å®ãã¡ã¤ã«ãç·¨éããã¨ç·¨éã楽ããã ãããã¡ã¤ã«ã¨ãã¡ã¤ã«ããããã©ã«ãã®ã¢ã¯ã»ã¹æ¨©ã¯ãã®ä»ã¦ã¼ã¶ãæ¸ãè¾¼ã¿å¯è½ã«ãªã£ã¦ããªãã¨ã¢ãããã¼ããåºæ¥ãªãã
ã»/opt/bitnami/apps/gitlab/htdoc
ã»ãããã·ãè¨å®ãã
ã~/.bashrcã«ä»¥ä¸ã追è¨
ãproxy=http://proxy:9080/
ãhttps_proxy=https://proxy:9080/
ãexport http_proxy=$proxy
ãexport HTTP_PROXY=$proxy
ãexport https_proxy=$https_proxy
ãexport HTTPS_PROXY=$https_proxy
ã
ã~/.gemrcã«ä»¥ä¸ã追è¨
ãhttp_proxy: http://proxy.example.com:8080
ã
ã»/opt/bitnami/apps/gitlab/htdocs/config/gitlab.ymlã®ä»¥ä¸ã®å ´æãç·¨é
ã## Web server settings
ãhost:ãã¹ãOSã®IPã¢ãã¬ã¹ã»ãã¡ã¤ã³
ãport:ãã¹ãOSã®ãã¼ã
ã
ã## Email settings
ã# Email address used in the "From" field in mails sent by GitLab
ãemail_from: GitLabç¨ã¡ã¼ã«ã¢ãã¬ã¹
ã
ã# If you use non-standard ssh port you need to specify it
ãssh_port: 2222
ã»Gitlabããªã¹ã¿ã¼ã
ãsudo /opt/bitnami/ctlscript.sh restart
ã»rakeã®update
ãsudo gem update rake
ã»æ£å¸¸ã«ã¤ã³ã¹ãã¼ã«ããã¦ããããã§ãã¯ãã
ãsu git
ãcd /opt/bitnami/apps/gitlab/htdocs/
ãbundle exec rake gitlab:check RAILS_ENV=production
ã»ãã§ãã¯NGã ã£ãã¨ãããä¿®æ£
ãsudo cp /opt/bitnami/apps/gitlab/htdocs/lib/support/init.d/gitlab /etc/init.d/gitlab
ãsudo chmod +x /etc/init.d/gitlab
ãsudo -u git -H git config --global user.name "GitLab"
ãsudo -u git -H git config --global user.email "user@example.com"
ã»ssh keyã§ãã°ã¤ã³åºæ¥ãããã«ããï¼ããããããªãã¨git pushã§ããªãï¼
ãchmod 755 /home/git/.ssh
ãchmod 644 /home/git/.ssh/authorized_keys
ã»åæAdminã¦ã¼ã¶
ãuser mail: user@example.com
ãpassword: bitnami
ã»Adminã¦ã¼ã¶ã§ãã°ã¤ã³ãããã¼ã ã¡ã³ãã¼ã®ã¦ã¼ã¶ãç»é²
ã»ssh keyã®ç»é²
ãssh-keygenãå®è¡ããç§å¯éµã¨å
¬ééµãä½æã
ãGitlabã«ãã°ã¤ã³ããProfileï¼SSH Keysããå
¬ééµãç»é²ã
ãã¯ã©ã¤ã¢ã³ããã·ã³ã®~/.ssh/ãã«ç§å¯éµãã¡ã¤ã«ãç½®ãã
ã»ã¯ã©ã¤ã¢ã³ããã·ã³ã®~/.ssh/configã«ä»¥ä¸ã追å ã
ãHost gitlab
User git
Hostname Gitlabãµã¼ãã®IPã»ãã¡ã¤ã³
Port 2222
IdentityFile /Users/uname/.ssh/id_rsa
ã»SourceTreeããGitlabã«ã¢ã¯ã»ã¹åºæ¥ãããã«ãã
ãããã¯ãã¼ã¯ã¦ã£ã³ãã¦ã§ãªãã¸ããªã®è¿½å ãã¯ãªãã¯ã
ããªãã¸ããªãã¯ãã¼ã³ï¼ã½ã¼ã¹ãã¹/URLã«Gitlabã®ããã¸ã§ã¯ããã¼ã¸ã®å³ä¸ã«ããSSHã®URIãã³ããã
ãã¯ãã¼ã³ãã¿ã³ãã¯ãªãã¯ããã
ã