Code Storage can now sync repositories from non-GitHub providers over generic HTTPS Git.
This covers providers like GitLab, Bitbucket, Codeberg, SourceHut, Gitea, and Forgejo. Instead of
requiring a GitHub App-style integration, you create a repository with a baseRepo in sync mode
and attach generic Git credentials for the upstream.
This is useful for teams running self-hosted Git, migrating repositories into Code Storage, or connecting to providers where standard HTTPS Git credentials are the right integration point.
const repo = await store.createRepo({
id: 'my-gitlab-mirror',
baseRepo: {
provider: 'gitlab',
owner: 'myorg',
name: 'myrepo',
operation: 'sync',
upstreamHost: 'gitlab.example.com',
defaultBranch: 'main',
},
});After the repository is created, attach credentials for the upstream repository:
curl -X POST https://code.storage/api/v1/repos/git-credentials \
-H "Authorization: Bearer $REPO_WRITE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"repo_id": "your-repo-id",
"username": "git-user",
"password": "git-password-or-token"
}'For providers with a default public host, Code Storage can derive the upstream URL automatically. If
you are using a self-hosted instance, pass upstreamHost as a bare hostname like
gitlab.example.com.
Generic HTTPS Git sync gives you the same base-repo sync model without depending on a provider-specific app installation flow.