This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
---
date: "2023-01-10T00:00:00+00:00"
title: "Swift 软件包注册表"
slug: "swift"
weight: 95
draft: false
toc: false
menu:
sidebar:
parent: "packages"
name: "Swift"
weight: 95
identifier: "swift"
---
# Swift 软件包注册表
为您的用户或组织发布 [Swift](https://www.swift.org/) 软件包。
**目录**
{{<toc>}}
## 要求
要使用 Swift 软件包注册表,您需要使用 [swift](https://www.swift.org/getting-started/) 消费软件包,并使用 HTTP 客户端(如 `curl`)发布软件包。
## 配置软件包注册表
要注册软件包注册表并提供凭据,请执行以下命令:
```shell
swift package-registry set https://gitea.example.com/api/packages/{owner}/swift -login {username} -password {password}