flagflag  If you want to see English page, please click "English" Button at Left.
Page Top

Getting Started anchor.png

Page Top

起動 anchor.png

  • サービス: gitlab-runsvdir.service
     
Page Top

設定変更 anchor.png

  • gitlab-ctl reconfigure
  • gitlab-ctl restart
     
Page Top

リポジトリ & レジストリ anchor.png

  • /var/opt/gitlab/git-data
  • /var/opt/gitlab/gitlab-rails/shared/regi​stry
     
Page Top

LDAP anchor.png

  • 変更の反映
    • # gitlab-ctl reconfigure
  • チェック
    • # gitlab-rake gitlab:ldap:check RAILS_ENV=production
       
Page Top

TLS anchor.png

  • CentOS7 だと TLS1.2 しか使えない.
  • /etc/gitlab/gitlab.rb
  • 変更の反映
    • # gitlab-ctl reconfigure
       
Page Top

HTTPS anchor.png

# pwd
/etc/gitlab/ssl
# ls -l
-rw-r--r--. 1 root root 1070  2月 19 15:14 gitlab.nsl.tuis.ac.jp.crt
-r--------. 1 root root 1679  2月 19 15:14 gitlab.nsl.tuis.ac.jp.key
-r--------. 1 root root 1675  2月 19 15:14 gitlab.nsl.tuis.ac.jp.key-staging
 
Page Top

Let's Encrypt anchor.png

  • 自動でやってくれるらしい
  • /etc/gitlab/gitlab.rb
    external_url 'https://gitlab.nsl.tuis.ac.jp'
    
    nginx['redirect_http_to_https'] = true
    nginx['redirect_http_to_https_port'] = 80
    nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
    nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"
    
    letsencrypt['enable'] = true
    letsencrypt['contact_emails'] = ['iseki@rsch.tuis.ac.jp'] # This should be an array of email addresses to add as contacts
    letsencrypt['group'] = 'root'
    letsencrypt['key_size'] = 2048
    letsencrypt['owner'] = 'root'
    letsencrypt['wwwroot'] = '/var/opt/gitlab/nginx/www'
    # See http://docs.gitlab.com/omnibus/settings/ssl.html#automatic-renewal for more on these sesttings
    letsencrypt['auto_renew'] = true
    letsencrypt['auto_renew_hour'] = 1
    letsencrypt['auto_renew_minute'] = 0 # Should be a number or cron expression, if specified.
    letsencrypt['auto_renew_day_of_month'] = "*/1"
    letsencrypt['auto_renew_log_directory'] = '/var/log/gitlab/lets-encrypt'
  • Log: /var/log/gitlab/lets-encrypt/*
     
Page Top
更新 anchor.png
gitlab-ctl upgrade
gitlab-ctl renew-le-certs
gitlab-ctl restart
 
Page Top

Docker Registry anchor.png

  • registry ディレクトリのパーミッションが固定:drwxrwx--- 3 registry git
    • repository 用のディレクトリ(drwxrwx--- 3 registry git)と衝突するので位置に注意.
  • 格納するイメージ名はある程度固定される.
    • ホスト名:5050/ユーザ名/プロジェクト名(大文字は小文字に,空白は-に変換)/~
       
Page Top
/etc/gitlab/gitlab.rb anchor.png
################################################################################
## Container Registry settings
##! Docs: https://docs.gitlab.com/ee/administration/container_registry.html
################################################################################

registry_external_url 'https://gitlab.nsl.tuis.ac.jp:5050' 

### Settings used by GitLab application 
#gitlab_rails['registry_enabled'] = true
#gitlab_rails['registry_host'] = "gitlab.nsl.tuis.ac.jp"
#gitlab_rails['registry_port'] = "5050"
#gitlab_rails['registry_path'] = "/var/opt/gitlab/gitlab-rails/shared/registry"
gitlab_rails['registry_path'] = "/opt/data/registry"
Page Top
login anchor.png
docker login gitlab.nsl.tuis.ac.jp:5050
~/.docker ができる.
  • LDAP ユーザのログイン方法は?
     
Page Top
push anchor.png
  • user: root , Project name : DockerRegistry
docker tag jupyterhub/singleuser-ltids:21092013  gitlab.nsl.tuis.ac.jp:5050/root/dockerregistry/jupytersingle-ltids
docker push  gitlab.nsl.tuis.ac.jp:5050/root/dockerregistry/jupytersingle-ltids
 
Page Top
pull anchor.png
docker pull gitlab.nsl.tuis.ac.jp:5050/root/dockerregistry/jupytersingle-ltids
 
Page Top

運用 anchor.png

Page Top

新規作成 anchor.png

Page Top
新規プロジェクト anchor.png
  • Create blank project
    • Create
  • clone でダウンロード.それを上書き.
  • add
  • commit
  • push
     
Page Top

Trouble Shooting anchor.png

Page Top
いつの間にか動かなくなっていた! anchor.png
  • ソフトウェアの更新が上手くいっていない可能性がある.
  • 順にバージョンを上げる必要がある.
    /etc/yum.repos.d/gitlab_gitlab-ce.repo をチェック
    # yum install gitlab-ce-5.1.*
    # gitlab-ctl  reconfigure
    # yum install gitlab-ce-5.2.*
    # gitlab-ctl  reconfigure
    # yum install gitlab-ce-5.3.*
    # gitlab-ctl  reconfigure
    # ........
  • gitlab-ce-5.18 で蹴躓く
     
Page Top
LDAP でログイン時にエラー anchor.png
  • Could not authenticate you from Ldapmain because "Undefined method `provider' for nil:nilclass".
  • LDAPのユーザ属性(posixAccount)に mailアドレスを追加する.see phpLDAPadmin
     
Page Top
root のパスワードを忘れた anchor.png
  • # gitlab-rails console -e production
    • user = User.where(id: 1).first
    • user.password = '********'
    • user.password_confirmation = '********'
    • user.save!
    • exit
--------------------------------------------------------------------------------
 Ruby:         ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
 GitLab:       14.0.1 (76b84b42f64) FOSS
 GitLab Shell: 13.19.0
 PostgreSQL:   12.6
--------------------------------------------------------------------------------
Loading production environment (Rails 6.1.3.2)
irb(main):001:0> user = User.where(id: 1).first      
=> #<User id:1 @root>
irb(main):002:0> user.password = '********'
=> "********"
irb(main):003:0> user.password_confirmation = '********'
=> "********"
irb(main):004:0> user.save!
Enqueued ActionMailer::MailDeliveryJob (Job ID: 529eea94-54df-4468-908b-9db35758e7dd) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", {:args=>[#<GlobalID:0x00007fa9fe922160 @uri=#<URI::GID gid://gitlab/User/1>>]}
=> true
irb(main):005:0> exit
 

トップ   凍結 差分 バックアップ 複製 名前変更 リロード   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom
Counter: 779, today: 1, yesterday: 1
最終更新: 2023-11-05 (日) 14:21:13 (JST) (166d) by iseki

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 4月翌月
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
<今日>

オンライン状況

67 人のユーザが現在オンラインです。 (11 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 67

もっと...

アクセスカウンタ

今日 : 3422342234223422
昨日 : 1169911699116991169911699
総計 : 2329075723290757232907572329075723290757232907572329075723290757
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com