ฐานความรู้

เชื่อมต่อบัญชี GitLab ของคุณเพื่อให้เว็บไซต์ของคุณปรับใช้งานจากที่เก็บโค้ด

สร้าง personal access token ของ GitLab ที่มีขอบเขต (scopes) api และ write_repository แล้วเชื่อมต่อ เพื่อให้การพุช (push) เป็นการปรับใช้เว็บไซต์ของคุณ

What connecting it does for you

Connecting GitLab lets a site deploy from one of your GitLab repositories, and lets us publish to GitLab Pages on your account where you choose it as a site's host.

Before you start

A GitLab account with access to the projects you want to deploy.

1. Create the key at GitLab

In GitLab, select your avatar at the top right, then Edit profile → Access → Personal access tokens, and generate a new token (GitLab may label this Legacy token in the Generate token menu). Name it, set an expiration date, and tick these scopes:

  • api
  • write_repository

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

2. Connect it here

Open Integrations in your dashboard and choose Connect an account. Pick Code hosting as the group and GitLab 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

It worked and then stopped. GitLab tokens always expire — usually at most a year after you create them — and GitLab emails you before they do. Create a new one and connect it.

A scope is missing. A token's scopes cannot be changed after it is created; create a new token with both scopes ticked.

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.

บทความล่าสุดจากบล็อก

สิ่งที่เราได้เขียนเกี่ยวกับการโฮสต์ SEO และการรันเว็บไซต์ในระดับสเกล

SEO และการสร้างลิงก์จากระดับโฮสติ้ง: มุมมองของผู้ให้บริการในปี 2026

โฮสติ้งส่งผลต่อการจัดดัชนีและลิงก์อีควิตี้ในปี 2026 อย่างไร: การรักษาหน้าเว็บให้อยู่ในดัชนี, การตรวจสอบโดเมนเก่าก่อนที่คุณจะสร้างเว็บไซต์บนโดเมนเหล่านั้น, การสร้างลิงก์แบบไม่ทิ้งร่องรอย และมุมมองตามความเป็นจริงว่าโครงสร้างพื้นฐานช่วยและไม่ช่วยอะไร SEO ได้บ้าง

อ่านโพสต์

ทำให้ WordPress เร็วและปลอดภัย: รายการตรวจสอบประสิทธิภาพและปลั๊กอิน

เช็คลิสต์ที่ใช้งานได้จริงสำหรับ WordPress ที่รวดเร็วและปลอดภัย: การแคชระดับเซิร์ฟเวอร์, ออบเจกต์แคชต่อเว็บไซต์, ปลั๊กอินจำนวนน้อยนิดที่คุ้มค่าแก่การใช้งาน, การอัปเดตสแตกให้เป็นปัจจุบันอยู่เสมอ และหน้า WooCommerce ที่คุณไม่ควรแคชเด็ดขาด

อ่านโพสต์

วิธีเลือกเว็บโฮสติ้งแบบจัดการระบบในปี 2026: คู่มือสำหรับผู้ซื้อ

สิ่งพิมพ์ที่แยกแยะระหว่างโฮสติ้งที่มีการจัดการอย่างดีกับเซิร์ฟเวอร์ราคาถูกที่มีแผงควบคุมอย่างแท้จริง ได้แก่ การย้ายข้อมูล การสำรองข้อมูล การแยกส่วนระบบ การแคชจริง และการปรับขนาดที่โปร่งใส รวมถึงวิธีประเมินก่อนที่คุณจะตัดสินใจเลือกใช้งาน

อ่านโพสต์

อ่านบล็อก

ยังมีปัญหาอยู่ใช่ไหม?

บริการช่วยเหลือรวมอยู่ในทุกแพลตฟอร์ม ทีมงานพร้อมให้บริการ 24 ชั่วโมงต่อวัน และคุณสามารถเขียนหาเราเป็นภาษาใดก็ได้จาก 58 ภาษาของเรา เราจะตอบกลับคุณด้วยภาษาของคุณ

ติดต่อฝ่ายสนับสนุน บทความทั้งหมด