<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # User management > 原文:[https://docs.gitlab.com/ee/raketasks/user_management.html](https://docs.gitlab.com/ee/raketasks/user_management.html) * [Add user as a developer to all projects](#add-user-as-a-developer-to-all-projects) * [Add all users to all projects](#add-all-users-to-all-projects) * [Add user as a developer to all groups](#add-user-as-a-developer-to-all-groups) * [Add all users to all groups](#add-all-users-to-all-groups) * [Control the number of active users](#control-the-number-of-active-users) * [Disable two-factor authentication for all users](#disable-two-factor-authentication-for-all-users) * [Rotate two-factor authentication encryption key](#rotate-two-factor-authentication-encryption-key) # User management[](#user-management-core-only "Permalink") GitLab 提供 Rake 任務用于用戶管理. ## Add user as a developer to all projects[](#add-user-as-a-developer-to-all-projects "Permalink") 要將用戶作為開發人員添加到所有項目中,請運行: ``` # omnibus-gitlab sudo gitlab-rake gitlab:import:user_to_projects[username@domain.tld] # installation from source bundle exec rake gitlab:import:user_to_projects[username@domain.tld] RAILS_ENV=production ``` ## Add all users to all projects[](#add-all-users-to-all-projects "Permalink") 要將所有用戶添加到所有項目,請運行: ``` # omnibus-gitlab sudo gitlab-rake gitlab:import:all_users_to_all_projects # installation from source bundle exec rake gitlab:import:all_users_to_all_projects RAILS_ENV=production ``` **注意:**管理員用戶被添加為維護者. ## Add user as a developer to all groups[](#add-user-as-a-developer-to-all-groups "Permalink") 要將用戶作為開發人員添加到所有組,請運行: ``` # omnibus-gitlab sudo gitlab-rake gitlab:import:user_to_groups[username@domain.tld] # installation from source bundle exec rake gitlab:import:user_to_groups[username@domain.tld] RAILS_ENV=production ``` ## Add all users to all groups[](#add-all-users-to-all-groups "Permalink") 要將所有用戶添加到所有組,請運行: ``` # omnibus-gitlab sudo gitlab-rake gitlab:import:all_users_to_all_groups # installation from source bundle exec rake gitlab:import:all_users_to_all_groups RAILS_ENV=production ``` **注意:**管理員用戶被添加為所有者,因此他們可以將其他用戶添加到組中. ## Control the number of active users[](#control-the-number-of-active-users "Permalink") 啟用此設置可以阻止新用戶被阻止,直到管理員將其清除為止. 默認為`false` : ``` block_auto_created_users: false ``` ## Disable two-factor authentication for all users[](#disable-two-factor-authentication-for-all-users "Permalink") 此任務為所有啟用了雙重身份驗證的用戶禁用兩因素身份驗證(2FA). 例如,如果 GitLab 的`config/secrets.yml`文件丟失并且用戶無法登錄,這將很有用. 要為所有用戶禁用雙重身份驗證,請運行: ``` # omnibus-gitlab sudo gitlab-rake gitlab:two_factor:disable_for_all_users # installation from source bundle exec rake gitlab:two_factor:disable_for_all_users RAILS_ENV=production ``` ## Rotate two-factor authentication encryption key[](#rotate-two-factor-authentication-encryption-key "Permalink") GitLab 將兩因素身份驗證(2FA)所需的機密數據存儲在加密的數據庫列中. 此數據的加密密鑰稱為`otp_key_base` ,存儲在`config/secrets.yml` . 如果該文件泄漏了,但單個 2FA 機密沒有泄漏,則可以使用新的加密密鑰重新加密這些機密. 這使您可以更改泄漏的密鑰,而不必強制所有用戶更改其 2FA 詳細信息. 旋轉兩因素身份驗證加密密鑰: 1. 查找舊密鑰. 該文件位于`config/secrets.yml`文件中,但請**確保您正在使用 Production 部分** . 您感興趣的行將如下所示: ``` production: otp_key_base: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ``` 2. 生成一個新的秘密: ``` # omnibus-gitlab sudo gitlab-rake secret # installation from source bundle exec rake secret RAILS_ENV=production ``` 3. 停止 GitLab 服務器,備份現有的機密文件,然后更新數據庫: ``` # omnibus-gitlab sudo gitlab-ctl stop sudo cp config/secrets.yml config/secrets.yml.bak sudo gitlab-rake gitlab:two_factor:rotate_key:apply filename=backup.csv old_key=<old key> new_key=<new key> # installation from source sudo /etc/init.d/gitlab stop cp config/secrets.yml config/secrets.yml.bak bundle exec rake gitlab:two_factor:rotate_key:apply filename=backup.csv old_key=<old key> new_key=<new key> RAILS_ENV=production ``` 可以從`config/secrets.yml`讀取`<old key>`值( `<new key>`是先前生成的). 用戶 2FA 機密的**加密**值將被寫入指定的`filename` . 如果發生錯誤,可以使用它進行回滾. 4. 更改`config/secrets.yml` `otp_key_base`以將`otp_key_base`設置為`<new key>`并重新啟動. 同樣,請確保您在**生產**部分中進行操作. ``` # omnibus-gitlab sudo gitlab-ctl start # installation from source sudo /etc/init.d/gitlab start ``` 如果有任何問題(也許為`old_key`使用了錯誤的值),則可以還原`config/secrets.yml` `old_key`的備份并回滾更改: ``` # omnibus-gitlab sudo gitlab-ctl stop sudo gitlab-rake gitlab:two_factor:rotate_key:rollback filename=backup.csv sudo cp config/secrets.yml.bak config/secrets.yml sudo gitlab-ctl start # installation from source sudo /etc/init.d/gitlab start bundle exec rake gitlab:two_factor:rotate_key:rollback filename=backup.csv RAILS_ENV=production cp config/secrets.yml.bak config/secrets.yml sudo /etc/init.d/gitlab start ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看