<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>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Uploads administration > 原文:[https://docs.gitlab.com/ee/administration/uploads.html](https://docs.gitlab.com/ee/administration/uploads.html) * [Using local storage](#using-local-storage) * [Using object storage](#using-object-storage-core-only) * [Object Storage Settings](#object-storage-settings) * [Connection settings](#connection-settings) * [OpenStack example](#openstack-example) # Uploads administration[](#uploads-administration "Permalink") 上傳代表可以作為單個文件發送到 GitLab 的所有用戶數據. 例如,化身和筆記的附件就是上載. 上傳是 GitLab 功能不可或缺的,因此不能被禁用. ## Using local storage[](#using-local-storage "Permalink") **注意:**這是默認配置 要更改上傳內容在本地存儲的位置,請按照以下步驟操作. **在所有安裝中;** **注意:**由于歷史原因,上載存儲在基本目錄中,默認情況下該目錄為`uploads/-/system` . 不建議在現有的 GitLab 安裝上更改此配置選項. *上載默認情況下存儲在`/var/opt/gitlab/gitlab-rails/uploads` .* 1. 要將存儲路徑更改為例如`/mnt/storage/uploads` ,請編輯`/etc/gitlab/gitlab.rb`并添加以下行: ``` gitlab_rails['uploads_storage_path'] = "/mnt/storage/" gitlab_rails['uploads_base_dir'] = "uploads" ``` 2. 保存文件并[重新配置 GitLab,](restart_gitlab.html#omnibus-gitlab-reconfigure)以使更改生效. **在源安裝中:** *上載默認存儲在`/home/git/gitlab/public/uploads/-/system` .* 1. 要將存儲路徑更改為例如`/mnt/storage/uploads` ,請編輯`/home/git/gitlab/config/gitlab.yml`并添加或修改以下行: ``` uploads: storage_path: /mnt/storage base_dir: uploads ``` 2. 保存文件并[重新啟動 GitLab,](restart_gitlab.html#installations-from-source)以使更改生效. ## Using object storage[](#using-object-storage-core-only "Permalink") 版本歷史 **筆記:** * 在[GitLab Premium](https://about.gitlab.com/pricing/) 10.5 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3867) . * 在[GitLab Core](https://about.gitlab.com/pricing/) 10.7 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/17358) . * 從 11.1 版開始,我們支持 direct_upload 到 S3\. 如果您不想使用安裝了 GitLab 的本地磁盤來存儲上載,則可以改用 AWS S3 之類的對象存儲提供程序. 此配置依賴于已經配置的有效 AWS 憑證. [Read more about using object storage with GitLab](object_storage.html). **注意:**我們建議使用[統一對象存儲設置](object_storage.html#consolidated-object-storage-configuration) . 以下說明適用于原始配置格式. ## Object Storage Settings[](#object-storage-settings "Permalink") 對于源安裝,以下設置嵌套在`uploads:`下,然后是`object_store:` 在 Omnibus GitLab 安裝上,它們的前綴是`uploads_object_store_` . | Setting | Description | Default | | --- | --- | --- | | `enabled` | 啟用/禁用對象存儲 | `false` | | `remote_directory` | 存儲上傳文件的存儲桶名稱 | ? | | `direct_upload` | 設置為 true 可從上載路徑中刪除 Puma. Workhorse 處理實際的工件上傳到對象存儲,而 Puma 進行最少的處理以跟蹤上傳. 無需本地共享存儲. 如果引入了對所有文件的單一存儲類型的支持,則可以刪除該選項. 了解更多有關[直接上傳的信息](../development/uploads.html#direct-upload) . | `false` | | `background_upload` | 設置為 false 可禁用自動上傳. 一旦直接上傳到 S3,就可以刪除該選項(如果`direct_upload`設置為`true` ,它將覆蓋`background_upload` ) | `true` | | `proxy_download` | 設置為 true 以啟用代理服務的所有文件. Option 可以減少出口流量,因為這允許客戶端直接從遠程存儲下載而不是代理所有數據 | `false` | | `connection` | 下述各種連接選項 | ? | ### Connection settings[](#connection-settings "Permalink") See [the available connection settings for different providers](object_storage.html#connection-settings). **在所有安裝中;** *上載默認情況下存儲在`/var/opt/gitlab/gitlab-rails/public/uploads/-/system` .* 1. 編輯`/etc/gitlab/gitlab.rb`并通過替換為所需的值添加以下行: ``` gitlab_rails['uploads_object_store_enabled'] = true gitlab_rails['uploads_object_store_remote_directory'] = "uploads" gitlab_rails['uploads_object_store_connection'] = { 'provider' => 'AWS', 'region' => 'eu-central-1', 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID', 'aws_secret_access_key' => 'AWS_SECRET_ACCESS_KEY' } ``` **注意:**如果您使用的是 AWS IAM 配置文件,請確保省略 AWS 訪問密鑰和秘密訪問密鑰/值對. ``` gitlab_rails['uploads_object_store_connection'] = { 'provider' => 'AWS', 'region' => 'eu-central-1', 'use_iam_profile' => true } ``` 2. 保存文件并[重新配置 GitLab,](restart_gitlab.html#omnibus-gitlab-reconfigure)以使更改生效. 3. 使用[`gitlab:uploads:migrate` Rake task](raketasks/uploads/migrate.html)遷移所有現有的本地上傳到對象存儲. **在源安裝中:** *上載默認存儲在`/home/git/gitlab/public/uploads/-/system` .* 1. 編輯`/home/git/gitlab/config/gitlab.yml`并添加或修改以下行: ``` uploads: object_store: enabled: true remote_directory: "uploads" # The bucket name connection: provider: AWS # Only AWS supported at the moment aws_access_key_id: AWS_ACESS_KEY_ID aws_secret_access_key: AWS_SECRET_ACCESS_KEY region: eu-central-1 ``` 2. 保存文件并[重新啟動 GitLab,](restart_gitlab.html#installations-from-source)以使更改生效. 3. 使用[`gitlab:uploads:migrate` Rake task](raketasks/uploads/migrate.html)遷移所有現有的本地上傳到對象存儲. ### OpenStack example[](#openstack-example "Permalink") **在所有安裝中;** *上載默認情況下存儲在`/var/opt/gitlab/gitlab-rails/public/uploads/-/system` .* 1. Edit `/etc/gitlab/gitlab.rb` and add the following lines by replacing with the values you want: ``` gitlab_rails['uploads_object_store_remote_directory'] = "OPENSTACK_OBJECT_CONTAINER_NAME" gitlab_rails['uploads_object_store_connection'] = { 'provider' => 'OpenStack', 'openstack_username' => 'OPENSTACK_USERNAME', 'openstack_api_key' => 'OPENSTACK_PASSWORD', 'openstack_temp_url_key' => 'OPENSTACK_TEMP_URL_KEY', 'openstack_auth_url' => 'https://auth.cloud.ovh.net/v2.0/', 'openstack_region' => 'DE1', 'openstack_tenant' => 'TENANT_ID', } ``` 2. 保存文件并[重新配置 GitLab,](restart_gitlab.html#omnibus-gitlab-reconfigure)以使更改生效. 3. 使用[`gitlab:uploads:migrate` Rake task](raketasks/uploads/migrate.html)遷移所有現有的本地上傳到對象存儲. * * * **在源安裝中:** *上載默認存儲在`/home/git/gitlab/public/uploads/-/system` .* 1. 編輯`/home/git/gitlab/config/gitlab.yml`并添加或修改以下行: ``` uploads: object_store: enabled: true direct_upload: false background_upload: true proxy_download: false remote_directory: OPENSTACK_OBJECT_CONTAINER_NAME connection: provider: OpenStack openstack_username: OPENSTACK_USERNAME openstack_api_key: OPENSTACK_PASSWORD openstack_temp_url_key: OPENSTACK_TEMP_URL_KEY openstack_auth_url: 'https://auth.cloud.ovh.net/v2.0/' openstack_region: DE1 openstack_tenant: 'TENANT_ID' ``` 2. 保存文件并[重新配置 GitLab,](restart_gitlab.html#omnibus-gitlab-reconfigure)以使更改生效. 3. 使用[`gitlab:uploads:migrate` Rake task](raketasks/uploads/migrate.html)遷移所有現有的本地上傳到對象存儲.
                  <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>

                              哎呀哎呀视频在线观看