Managing Porch Repositories
If you don’t have a Git repository already created and initialized, follow the steps below to create and use your own Git repository.
Creating and initializing a Git Repository
- Create a new repository in your Git hosting service (e.g., GitHub, GitLab, Gitea, Bitbucket).
- Navigate to your user or organization page and create a new repository.
- Provide a name (e.g.,
porch-repo), description, and set visibility as needed.
- Initialize the repository for the main/master branch to exist (typically done by adding a README.md file in the UI) or by cloning it locally and adding initial content.
For detailed instructions on repository creation, refer to your Git hosting service documentation. For example on GitHub.
Register a Git-Repository as a Porch-Repository
The porchctl command-line tool provides a straightforward way to register a repository.
Command Syntax
The basic command for registering a repository is:
porchctl repo register REPOSITORY [flags]
For more information about the repo command and available flags, see the Porchctl CLI guide
Repository registration.
Example
This example registers a private Git repository hosted on Gitea and configures it as a deployment repository.
# Register a Git repository with Porch
porchctl repo register http://gitea.gitea:3000/nephio/porch-test.git \
--name=porch-test \
--description="Test repository for Porch packages" \
--branch=main \
--deployment=true \
--repo-basic-username=nephio \
--repo-basic-password=secret
Note
Replace the Git URL, repository name, username, and password with your own values.See Also
In this example we demonstrate a simple HTTP Basic auth setup using a Kubernetes Secret. For production environments, secret management solutions are preferred (external secret stores, sealed-secrets, or platform secrets) and the avoidance of embedding plaintext credentials in scripts.