Before you start
Have the repository’s HTTPS URL, your provider username, and the intended project/repository folder ready. Use a URL without a token, such as:Create a token
GitHub: Open your account Settings → Developer settings → Personal access tokens → Fine-grained tokens → Generate new token. Select an expiration date, the correct resource owner, and only the repositories you need. Grant Contents: Read-only for reading, or Read and write when the agent will also change code. Complete organization approval if required. See GitHub token creation and compatibility guidance. GitLab: On the GitLab host that owns your repository, open Edit profile → Access → Personal access tokens. Create an expiring PAT; newer versions may label the scope-based option Legacy token. Select read_repository for reading or write_repository for reading and pushing. These Git scopes do not grant general API access. See GitLab token creation and scope definitions. A token cannot grant access that your provider account does not already have. Copy it once for the method below; do not paste it into an Agent Chat message.Choose a setup method
- Easy way: upload a file
- More secure way: Terminal