Trung tâm kiến thức

Kết nối tài khoản GitHub của bạn bằng mã thông báo để các trang web của bạn triển khai từ một kho lưu trữ

Tạo một GitHub token loại chi tiết cho các kho lưu trữ bạn triển khai và kết nối token đó, để mỗi lần đẩy mã (push) sẽ triển khai trang web của bạn và các nhánh sẽ có bản xem trước.

What connecting it does for you

Connecting GitHub with a token lets a site deploy from one of your repositories: push to the branch and the site updates. It also lets us publish to GitHub Pages on your account where you choose that as a site's host.

If your repositories belong to an organisation, prefer the Zinn® GitHub app instead — see Install the Zinn® GitHub app. A token belongs to one person and stops working when they leave.

Before you start

A GitHub account with access to the repositories you want to deploy. If they belong to an organisation, an owner may have to approve fine-grained tokens for it.

1. Create the key at GitHub

On GitHub, click your profile picture, then Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token. Name it and choose an expiration. Under Repository access choose Only select repositories and pick the ones you deploy — the narrowest access that works.

Under Repository permissions give Read and write on:

  • Contents
  • Pages
  • Administration

Press Generate token and copy it — GitHub shows it once.

2. Connect it here

Open Integrations in your dashboard and choose Connect an account. Pick Code hosting as the group and GitHub as the account, fill in API token, and press Connect account.

We test what you paste before anything is saved. A key that does not work is never stored, and the answer says what was wrong with it. A key that works is kept encrypted in our secrets vault — never in our database — and is never shown again, not even to you.

What happens next

  • A site can deploy straight from a repository on this account: choose it on the
  • site's repository connection, pick the repository and branch, and a push deploys.

  • Every other branch can get its own preview, so you can check a change before it reaches the
  • live site.

  • Git-built static hosts such as Render and Azure Static Web Apps use this connection as the
  • source of the site's code.

If it does not connect

A repository does not appear. The token's repository access does not include it. Edit the token on GitHub and add the repository.

It worked and then stopped. Fine-grained tokens expire on the date you chose. Generate a new one and connect it; GitHub emails you before a token expires.

It says the key was rejected. Almost always one of three things: a space or a line break copied with it, a key that has expired, or a key that was revoked or regenerated after you copied it. Create a fresh one and paste it again.

It connects, but something later fails. The key authenticates but lacks a permission the action needs. Create a new key with the permissions listed above, then disconnect the old connection and connect the new key.

Disconnecting

Open Integrations, find the account and press Disconnect. That deletes the stored key at once. Anything that was using it stops at its next action, and the screens that depended on it say so rather than failing quietly.

Disconnecting does not undo what was already done — records, deployments or settings we changed on your account stay as they are. If you think the key itself may have leaked, also revoke it at the vendor; disconnecting removes our copy, not theirs.

Bài viết mới nhất từ blog

Những nội dung chúng tôi đã viết về lưu trữ, SEO và vận hành trang web ở quy mô lớn.

SEO và Xây dựng liên kết từ Tầng Lưu trữ: Góc nhìn của nhà vận hành năm 2026

Hosting định hình việc lập chỉ mục và sức mạnh liên kết trong năm 2026 ra sao: duy trì chỉ mục trang, thẩm định các tên miền lâu năm trước khi xây dựng, xây dựng liên kết không để lại dấu vết, và quan điểm trung thực về những gì cơ sở hạ tầng có thể và không thể làm cho SEO.

Đọc bài đăng

Làm cho WordPress Nhanh và Bảo mật: Danh sách kiểm tra Hiệu suất và Plugin

Một danh sách kiểm tra thực tế để có WordPress nhanh và an toàn: bộ nhớ đệm cấp máy chủ, bộ nhớ đệm đối tượng cho mỗi trang web, số ít plugin đáng sử dụng, giữ cho hệ thống luôn cập nhật và các trang WooCommerce mà bạn không bao giờ được lưu vào bộ nhớ đệm.

Đọc bài đăng

Cách Chọn Web Hosting Quản Trị Năm 2026: Hướng Dẫn Dành Cho Người Mua

Điều thực sự phân biệt dịch vụ quản lý hosting chất lượng với một gói giá rẻ kèm bảng điều khiển — các tính năng di chuyển trang, sao lưu, cách ly, bộ nhớ đệm thực sự và khả năng mở rộng minh bạch — cùng cách đánh giá trước khi bạn cam kết sử dụng.

Đọc bài đăng

Đọc blog

Vẫn chưa được?

Hỗ trợ được bao gồm trong mọi gói, bộ phận chăm sóc khách hàng hoạt động 24 giờ một ngày và quý khách có thể viết thư cho chúng tôi bằng bất kỳ ngôn ngữ nào trong số 58 ngôn ngữ của chúng tôi — chúng tôi sẽ trả lời quý khách bằng ngôn ngữ của quý khách.

Liên hệ bộ phận hỗ trợ Tất cả bài viết