code.gitea.io/gitea@v1.22.3/docs/content/usage/packages/conan.en-us.md (about) 1 --- 2 date: "2021-07-20T00:00:00+00:00" 3 title: "Conan Package Registry" 4 slug: "conan" 5 sidebar_position: 20 6 draft: false 7 toc: false 8 menu: 9 sidebar: 10 parent: "packages" 11 name: "Conan" 12 sidebar_position: 20 13 identifier: "conan" 14 --- 15 16 # Conan Package Registry 17 18 Publish [Conan](https://conan.io/) packages for your user or organization. 19 20 ## Requirements 21 22 To work with the Conan package registry, you need to use the [conan](https://conan.io/downloads.html) command line tool to consume and publish packages. 23 24 ## Configuring the package registry 25 26 To register the package registry you need to configure a new Conan remote: 27 28 ```shell 29 conan remote add {remote} https://gitea.example.com/api/packages/{owner}/conan 30 conan user --remote {remote} --password {password} {username} 31 ``` 32 33 | Parameter | Description | 34 | -----------| ----------- | 35 | `remote` | The remote name. | 36 | `username` | Your Gitea username. | 37 | `password` | Your Gitea password. If you are using 2FA or OAuth use a [personal access token](development/api-usage.md#authentication) instead of the password. | 38 | `owner` | The owner of the package. | 39 40 For example: 41 42 ```shell 43 conan remote add gitea https://gitea.example.com/api/packages/testuser/conan 44 conan user --remote gitea --password password123 testuser 45 ``` 46 47 ## Publish a package 48 49 Publish a Conan package by running the following command: 50 51 ```shell 52 conan upload --remote={remote} {recipe} 53 ``` 54 55 | Parameter | Description | 56 | ----------| ----------- | 57 | `remote` | The remote name. | 58 | `recipe` | The recipe to upload. | 59 60 For example: 61 62 ```shell 63 conan upload --remote=gitea ConanPackage/1.2@gitea/final 64 ``` 65 66 You cannot publish a file with the same name twice to a package. You must delete the existing package or file first. 67 68 The Gitea Conan package registry has full [revision](https://docs.conan.io/en/latest/versioning/revisions.html) support. 69 70 ## Install a package 71 72 To install a Conan package from the package registry, execute the following command: 73 74 ```shell 75 conan install --remote={remote} {recipe} 76 ``` 77 78 | Parameter | Description | 79 | ----------| ----------- | 80 | `remote` | The remote name. | 81 | `recipe` | The recipe to download. | 82 83 For example: 84 85 ```shell 86 conan install --remote=gitea ConanPackage/1.2@gitea/final 87 ``` 88 89 ## Supported commands 90 91 ``` 92 conan install 93 conan get 94 conan info 95 conan search 96 conan upload 97 conan user 98 conan download 99 conan remove 100 ```