

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon Q Developer for GitHub 問題故障診斷
<a name="github-troubleshooting"></a>

請參閱下一節，了解如何針對使用 Amazon Q Developer for GitHub 時的常見問題進行故障診斷。

## Amazon Q Developer 未在具有分支保護規則的儲存庫中產生提取請求
<a name="github-troubleshooting-branch-protection"></a>

**問題**：Amazon Q Developer 無法在擁有分支保護規則的 GitHub 儲存庫中建立提取請求。

**解決方案**：分支保護規則會阻止 Amazon Q Developer 建立分支以建立提取請求。若要在具有分支保護規則的儲存庫中使用 Amazon Q Developer for GitHub，您需要將 Amazon Q Developer 應用程式新增至允許清單。

**若要將 Amazon Q Developer 應用程式新增至允許清單**

1. 如有需要，使用您的 GitHub 憑證登入 [https://github.com/](https://github.com/) 帳戶。

1. 瀏覽至您的 GitHub 組織，然後瀏覽至您要將 Amazon Q Developer for GitHub 應用程式加入允許清單的儲存庫。

1. 選擇**設定**，然後從導覽窗格中選擇**分支**。

1. 在**分支保護規則**下，選擇**編輯**以修改分支保護規則。

1. 選擇**限制建立相符分支的推送**，並搜尋 Amazon Q Developer for GitHub 應用程式。

1. 選擇**儲存變更**，以允許 Amazon Q Developer 針對有 Amazon Q Developer 標籤的問題建立提取請求。

若要進一步了解如何修改 GitHub 中的分支保護規則，請參閱[建立分支保護規則](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule#creating-a-branch-protection-rule)。

## GitHub 問題中缺少 Amazon Q Developer 標籤
<a name="github-troubleshooting-labels"></a>

**問題**：我在GitHub問題中看不到 **Amazon Q 開發代理程式**標籤。

**解決方案**：如果在為GitHub應用程式安裝 Amazon Q Developer 時未自動建立標籤，或意外刪除標籤，您可以在 中手動建立標籤GitHub。標籤必須命名為 **Amazon Q 開發代理**程式，才能將其識別並處理為 Amazon Q 開發人員標籤。如需詳細資訊，請參閱文件 *GitHub 文件*中的[建立標籤](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label)。

## Amazon Q Developer 未針對 GitHub 問題建立程式碼
<a name="github-troubleshooting-generate-code"></a>

**問題**：我已建立 GitHub 問題並調用 Amazon Q Developer 來執行任務，但收到下面一系列有關技術問題的訊息：

1. ⏳ I'm working on generating code for this issue. I'll update this issue with a comment and open a pull request when I'm done.

1. ⚠️ I'm having technical difficulties. I couldn't solve the issue. I'm going to try again. This might take some time.

1. ⚠️ I'm having technical difficulties. I couldn't solve the issue. I'm going to try again. This might take some time.

1. 🔴 I'm having technical difficulties. I couldn't solve the issue.

   Consider reassigning this issue to a user. This will help you stay within the quotas for generative AI feature usage.

**解決方案**：如果 Amazon Q Developer 無法處理您的問題並為其產生程式碼，請建立新的問題，並將 **Amazon Q 開發代理程式**標籤套用至新問題。若要進一步了解如何建立問題和套用 Amazon Q Developer 代理程式標籤，請參閱 [在 GitHub 中使用 Amazon Q Developer 開發功能和進行迭代](github-feature-development.md)。