Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,32 @@ For more information about bind mounts, please see the
[Docker documentation](https://docs.docker.com/storage/bind-mounts/). We do expect all test cases
to pass if you want your changes to be merged.

## GitHub Copilot CLI

The tools image installs the latest stable
[`@github/copilot`](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli)
package globally, making `copilot` available to regular Cloud Shell users in Bash and PowerShell.
Users authenticate with their own GitHub account and need a Copilot entitlement and any required
organization policy approval. Azure sign-in does not sign users into GitHub Copilot.

On headless Linux, Copilot may ask to save its authentication token in plaintext when a system
keychain is unavailable. This is credential-storage consent, not a prompt to save ordinary settings.
The image leaves this prompt and all directory-trust and tool-permission prompts unchanged, in both
ephemeral and persistent Cloud Shell sessions. The documented CLI options do not provide a
session-only OAuth login that skips credential storage. Relocating configuration does not remove
that consent requirement. The `storeTokenPlaintext` setting opts into plaintext storage, not
session-only authentication, and is not set by the image.

For users who already have a supported token, GitHub documents environment-variable authentication
with `COPILOT_GITHUB_TOKEN`, `GH_TOKEN`, or `GITHUB_TOKEN` as an alternative to OAuth login. Supply
tokens only at runtime; do not put them in the image, shell history, or shared scripts. See
[Authenticating GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/authenticate-copilot-cli).

Copilot's license and notices are retained in the globally installed npm package. Inclusion still
requires the maintainer review described in the [Package Inclusion Guide](./docs/package-inclusion-guide.md),
including exceptions for the upstream npm source and package size. Image source changes are not a
deployment to the Cloud Shell service.

## Contribution Guidelines

### Types of issues
Expand Down
4 changes: 4 additions & 0 deletions linux/tools.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ FROM ${IMAGE_LOCATION}

LABEL org.opencontainers.image.source="https://github.com/Azure/CloudShell"

# Install the latest stable GitHub Copilot CLI for all users.
RUN npm install -q -g @github/copilot \
&& npm cache clean --force

RUN tdnf clean all && \
tdnf repolist --refresh && \
ACCEPT_EULA=Y tdnf update -y && \
Expand Down
12 changes: 12 additions & 0 deletions tests/PSinLinuxCloudShellImage.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@ Describe "Various programs installed with expected versions" -Tag "CloudShellUse
}
}

Describe "GitHub Copilot CLI" -Tag "CloudShellUser" {
It "Runs without authentication" {
$version = copilot --version
$LASTEXITCODE | Should-Be 0
($version -join "`n") | Should-MatchString 'GitHub Copilot CLI'

$helpText = copilot --help
$LASTEXITCODE | Should-Be 0
($helpText -join "`n") | Should-MatchString 'Usage: copilot'
}
}

Describe "PowerShell Modules" {

BeforeAll {
Expand Down
1 change: 1 addition & 0 deletions tests/command_list
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ containerd
containerd-shim-runc-v2
containerd-stress
continue
copilot
coproc
corepack
cp
Expand Down
Loading