github.com/wmuizelaar/kpt@v0.0.0-20221018115725-bd564717b2ed/site/book/08-package-orchestration/03-registering-a-repository.md (about) 1 In the following sections of this chapter you will explore package authoring 2 using Porch. You will need: 3 4 * A GitHub repository for your blueprints. An otherwise empty repository with an 5 initial commit works best. The initial commit is required to establish the 6 `main` branch. 7 * A GitHub [Personal Access Token](https://github.com/settings/tokens) with 8 the `repo` scope for Porch to authenticate with the repository and allow it 9 to create commits in the repository. 10 11 Use the `kpt alpha repo register` command to register your repository with 12 Porch: The command below uses the repository `deployments.git`. 13 Your repository name may be different; please update the command with the 14 correct repository name. 15 16 ```sh 17 # Register your Git repository: 18 19 GITHUB_USERNAME=<GitHub Username> 20 GITHUB_TOKEN=<GitHub Personal Access Token> 21 REPOSITORY_ADDRESS=<Your Repository URL> 22 23 $ kpt alpha repo register \ 24 --namespace default \ 25 --name deployments \ 26 --deployment \ 27 --repo-basic-username=${GITHUB_USERNAME} \ 28 --repo-basic-password=${GITHUB_TOKEN} \ 29 ${REPOSITORY_ADDRESS} 30 ``` 31 32 And register the sample repository we used in the [quickstart](./02-quickstart): 33 34 ```sh 35 # Register the sample repository: 36 37 kpt alpha repo register --namespace default \ 38 https://github.com/GoogleContainerTools/kpt-samples.git 39 ``` 40 41 ?> Refer to the [register command reference][register-doc] for usage. 42 43 You now have two repositories registered, and your repository is marked as 44 deployment repository. This indicates that published packages in the repository 45 are considered deployment-ready. 46 47 ```sh 48 # Query repositories registered with Porch: 49 $ kpt alpha repo get 50 NAME TYPE CONTENT DEPLOYMENT READY ADDRESS 51 deployments git Package true True [Your repository address] 52 kpt-samples git Package True https://github.com/GoogleContainerTools/kpt-samples.git 53 ``` 54 55 ?> Refer to the [get command reference][get-doc] for usage. 56 57 [register-doc]: /reference/cli/alpha/repo/reg/ 58 [get-doc]: /reference/cli/alpha/repo/get/