Skip to content

Commit b58f0ea

Browse files
authored
Merge pull request #13028 from github/repo-sync
repo sync
2 parents db2da07 + f11b827 commit b58f0ea

67 files changed

Lines changed: 2470 additions & 863 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,38 @@ ACR_CONTAINER_REGISTRY_USER = acr-user-here
7474
ACR_CONTAINER_REGISTRY_PASSWORD = <PAT>
7575
```
7676

77-
For information on common image registries, see "[Common image registry servers](#common-image-registry-servers)."
77+
For information on common image registries, see "[Common image registry servers](#common-image-registry-servers)." Note that accessing AWS Elastic Container Registry (ECR) is different.
7878

7979
![Image registry secret example](/assets/images/help/settings/codespaces-image-registry-secret-example.png)
8080

8181
Once you've added the secrets, you may need to stop and then start the codespace you are in for the new environment variables to be passed into the container. For more information, see "[Suspending or stopping a codespace](/codespaces/codespaces-reference/using-the-command-palette-in-codespaces#suspending-or-stopping-a-codespace)."
8282

83+
#### Accessing AWS Elastic Container Registry
84+
85+
To access AWS Elastic Container Registry (ECR), you can provide an AWS access key ID and secret key, and {% data variables.product.prodname_dotcom %} can retrieve an access token for you and log in on your behalf.
86+
87+
```
88+
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
89+
*_CONTAINER_REGISTRY_USER = <AWS_ACCESS_KEY_ID>
90+
*_container_REGISTRY_PASSWORD = <AWS_SECRET_KEY>
91+
```
92+
93+
You must also ensure you have the appropriate AWS IAM permissions to perform the credential swap (e.g. `sts:GetServiceBearerToken`) as well as the ECR read operation (either `AmazonEC2ContainerRegistryFullAccess` or `ReadOnlyAccess`).
94+
95+
Alternatively, if you don't want GitHub to perform the credential swap on your behalf, you can provide an authorization token fetched via AWS's APIs or CLI.
96+
97+
```
98+
*_CONTAINER_REGISTRY_SERVER = <ECR_URL>
99+
*_CONTAINER_REGISTRY_USER = AWS
100+
*_container_REGISTRY_PASSWORD = <TOKEN>
101+
```
102+
103+
Since these tokens are short lived and need to be refreshed periodically, we recommend providing an access key ID and secret.
104+
105+
While these secrets can have any name, so long as the `*_CONTAINER_REGISTRY_SERVER` is an ECR URL, we recommend using `ECR_CONTAINER_REGISTRY_*` unless you are dealing with multiple ECR registries.
106+
107+
For more information, see AWS ECR's "[Private registry authentication documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)."
108+
83109
### Common image registry servers
84110

85111
Some of the common image registry servers are listed below:
@@ -90,6 +116,6 @@ Some of the common image registry servers are listed below:
90116
- [AWS Elastic Container Registry](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html) - `<aws_account_id>.dkr.ecr.<region>.amazonaws.com`
91117
- [Google Cloud Container Registry](https://cloud.google.com/container-registry/docs/overview#registries) - `gcr.io` (US), `eu.gcr.io` (EU), `asia.gcr.io` (Asia)
92118

93-
#### Accessing AWS Elastic Container Registry
119+
## Debugging private image registry access
94120

95-
If you want to access AWS Elastic Container Registry (ECR), you must provide an AWS authorization token in the `ECR_CONTAINER_REGISTRY_PASSWORD`. This authorization token is not the same as your secret key. You can obtain an AWS authorization token by using AWS's APIs or CLI. These tokens are short lived and will need to be refreshed periodically. For more information, see AWS ECR's "[Private registry authentication documentation](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)."
121+
If you are having trouble pulling an image from a private image registry, make sure you are able to run `docker login -u <user> -p <password> <server>`, using the values of the secrets defined above. If login fails, ensure that the login credentials are valid and that you have the apprioriate permissions on the server to fetch a container image. If login succeeds, make sure that these values are copied appropriately into the right {% data variables.product.prodname_codespaces %} secrets, either at the user, repository, or organization level and try again.

data/graphql/ghae/schema.docs-ghae.graphql

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9235,6 +9235,11 @@ type Enterprise implements Node {
92359235
The search string to look for.
92369236
"""
92379237
query: String
9238+
9239+
"""
9240+
The viewer's role in an organization.
9241+
"""
9242+
viewerOrganizationRole: RoleInOrganization
92389243
): OrganizationConnection!
92399244

92409245
"""
@@ -17705,6 +17710,16 @@ type Mutation {
1770517710
input: UpdateLabelInput!
1770617711
): UpdateLabelPayload @preview(toggledBy: "bane-preview")
1770717712

17713+
"""
17714+
Sets whether private repository forks are enabled for an organization.
17715+
"""
17716+
updateOrganizationAllowPrivateRepositoryForkingSetting(
17717+
"""
17718+
Parameters for UpdateOrganizationAllowPrivateRepositoryForkingSetting
17719+
"""
17720+
input: UpdateOrganizationAllowPrivateRepositoryForkingSettingInput!
17721+
): UpdateOrganizationAllowPrivateRepositoryForkingSettingPayload
17722+
1770817723
"""
1770917724
Updates an existing project.
1771017725
"""
@@ -21238,6 +21253,11 @@ type Organization implements Actor & MemberStatusable & Node & ProfileOwner & Pr
2123821253
orderBy: UserStatusOrder = {field: UPDATED_AT, direction: DESC}
2123921254
): UserStatusConnection!
2124021255

21256+
"""
21257+
Members can fork private repositories in this organization
21258+
"""
21259+
membersCanForkPrivateRepositories: Boolean!
21260+
2124121261
"""
2124221262
A list of users who are members of this organization.
2124321263
"""
@@ -33813,6 +33833,26 @@ type ReviewStatusHovercardContext implements HovercardContext {
3381333833
reviewDecision: PullRequestReviewDecision
3381433834
}
3381533835

33836+
"""
33837+
Possible roles a user may have in relation to an organization.
33838+
"""
33839+
enum RoleInOrganization {
33840+
"""
33841+
A user who is a direct member of the organization.
33842+
"""
33843+
DIRECT_MEMBER
33844+
33845+
"""
33846+
A user with full administrative access to the organization.
33847+
"""
33848+
OWNER
33849+
33850+
"""
33851+
A user who is unaffiliated with the organization.
33852+
"""
33853+
UNAFFILIATED
33854+
}
33855+
3381633856
"""
3381733857
The possible digest algorithms used to sign SAML requests for an identity provider.
3381833858
"""
@@ -39265,6 +39305,46 @@ type UpdateLabelPayload @preview(toggledBy: "bane-preview") {
3926539305
label: Label
3926639306
}
3926739307

39308+
"""
39309+
Autogenerated input type of UpdateOrganizationAllowPrivateRepositoryForkingSetting
39310+
"""
39311+
input UpdateOrganizationAllowPrivateRepositoryForkingSettingInput {
39312+
"""
39313+
A unique identifier for the client performing the mutation.
39314+
"""
39315+
clientMutationId: String
39316+
39317+
"""
39318+
Enable forking of private repositories in the organization?
39319+
"""
39320+
forkingEnabled: Boolean!
39321+
39322+
"""
39323+
The ID of the organization on which to set the allow private repository forking setting.
39324+
"""
39325+
organizationId: ID! @possibleTypes(concreteTypes: ["Organization"])
39326+
}
39327+
39328+
"""
39329+
Autogenerated return type of UpdateOrganizationAllowPrivateRepositoryForkingSetting
39330+
"""
39331+
type UpdateOrganizationAllowPrivateRepositoryForkingSettingPayload {
39332+
"""
39333+
A unique identifier for the client performing the mutation.
39334+
"""
39335+
clientMutationId: String
39336+
39337+
"""
39338+
A message confirming the result of updating the allow private repository forking setting.
39339+
"""
39340+
message: String
39341+
39342+
"""
39343+
The organization with the updated allow private repository forking setting.
39344+
"""
39345+
organization: Organization
39346+
}
39347+
3926839348
"""
3926939349
Autogenerated input type of UpdateProjectCard
3927039350
"""

0 commit comments

Comments
 (0)