> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/pre-basic/providers/github-copilot.md).

# GitHub Copilot

使用 GitHub Copilot 需要先拥有一个 GitHub 账号，并订阅 GitHub Copilot 服务，free 版本的订阅也可以，但 free 版本不支持最新的 Claude 3.7 模型，具体请参考 [GitHub Copilot 官网](https://github.com/features/copilot)。

## 获取 Device Code

点击「登录 GitHub」，获取 Device Code 并复制。

<figure><img src="/files/3WeICKPqkv3QCENSNQxm" alt="获取 Device Code 示例图片"><figcaption><p>获取 Device Code</p></figcaption></figure>

## 在浏览器中填写 Device Code 并授权

成功获取 Device Code 后，点击链接打开浏览器，在浏览器中登录 GitHub 账号，输入 Device Code 并授权。

<figure><img src="/files/2uM9fkPOP41tIB2nFMSf" alt="GitHub授权.png 示例图片"><figcaption><p>GitHub 授权</p></figcaption></figure>

授权成功后，返回 Cherry Studio，点击「连接 GitHub」，成功后会显示 GitHub 用户名和头像。

<figure><img src="/files/J5pcmoT5chusMeb4E6o1" alt="GitHub连接成功示例图片"><figcaption><p>GitHub 连接成功</p></figcaption></figure>

## 点击「管理」获取模型列表

点击下方的「管理」按钮，会自动联网获取当前支持的模型列表。

<figure><img src="/files/vNt207VM8n9nmvXEBy7k" alt="管理按钮获取模型列表示例图片"><figcaption><p>获取模型列表</p></figcaption></figure>

## 常见问题

### 获取 Device Code 失败，请重试

<figure><img src="/files/eU8TKp0kFnvfwVM7Ch1y" alt="获取 Device Code 失败示例图片"><figcaption><p>获取 Device Code 失败</p></figcaption></figure>

目前使用 Axios 构建请求，Axios 不支持 socks 代理，请使用系统代理或 HTTP 代理，或者直接不在 CherryStudio 中设置代理，使用全局代理。首先请确保您的网络连接正常，以避免获取 Device Code 失败的情况。

***

### 💡 获取帮助与提交反馈

如果您在配置或使用过程中遇到任何疑问、Bug 或有功能改进建议，请参考 [反馈与建议](/question-contact/suggestions.md) 中提供的官方渠道。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/pre-basic/providers/github-copilot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
