Skip to content
Join free
apify

Apify Fix Git Connection skill

Repair an Apify Actor's broken Git connection - pushes to GitHub that no longer start a build, builds that fail to clone the repository, or a GitHub integration rejected as invalid or expired (for example after Apify API tokens were revoked). Use when a Git-sourced Actor stopped deploying from its repository.

$npx alyn-cli add apify-fix-git-connection
View this skill on GitHubapify/agent-skills/skills/apify-fix-git-connection/SKILL.md
Pack stars
2,501
Pack installs
75k
Alyn Score
65/99
Updated
13 h ago

apify

Apify Fix Git Connection

What is the Apify Fix Git Connection skill?

Apify Fix Git Connection is a coding skill by apify for Claude Code, Cursor, Codex and other AI coding agents. Repair an Apify Actor's broken Git connection - pushes to GitHub that no longer start a build, builds that fail to clone the repository, or a GitHub integration rejected as invalid or expired (for example after Apify API tokens were revoked). Use when a Git-sourced Actor stopped deploying from its repository.

A Git-sourced Actor deploys through two links, and each one breaks on its own:

When to use it

Use when a Git-sourced Actor stopped deploying from its repository.

What the SKILL.md covers

  • 1. Find the Git version
  • 2. Diagnose the clone link
  • 3. Diagnose the trigger link
  • 4. Repair the clone link
  • 5. Repair the trigger link
  • 6. Prove the chain with one push
Author
apify
Pack
apify/agent-skills (6 skills)
Category
Coding, #803 of 1768
Alyn Score
65 / 99
Files
1
License
Not stated
Last updated
13 h ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Apify Fix Git Connection compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Apify Fix Git Connection · apify652.5k13 h ago
Skill Curator · laolaoshiren559132 days ago
Accessing Github Repos · oaustegard6640320 h ago
Dsh Marker Reader · alibaba511.5k10 h ago

Install Apify Fix Git Connection

Pick your agent. Every command is ready to paste.

$npx alyn-cli add apify-fix-git-connection

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add apify/agent-skills --skill apify-fix-git-connection

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads apify-fix-git-connection when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the apify-fix-git-connection skill”. In Codex, type $apify-fix-git-connection.

The skill itself

SKILL.md

FolderGitHub

Fix an Actor's Git connection

A Git-sourced Actor deploys through two links, and each one breaks on its own:

  • Clone: Apify reads the repository when it builds.
  • Trigger: a push to the repository starts that build.

Diagnose both links, repair the broken ones, then prove the chain with one push. Runs keep using the last successful build the whole time, so the Actor stays up while you work.

The steps use the Apify CLI (apify login first) and the GitHub CLI (gh). They are written for GitHub; GitLab and Bitbucket have the same two links behind different commands and screens.

Two rules hold in every step:

  • Ask before a deploy. A successful build moves the version's build tag (usually latest) to the head of the branch, so starting a build and pushing a commit are both deploys. Get the user's go-ahead for each.
  • Tokens stay with the user. A webhook URL embeds an Apify API token. Print only its host, as the commands below do, and judge a delivery by its status code: its response body repeats the URL. The user performs every step that handles a key, a token or that URL.

1. Find the Git version

apify api GET '/v2/actors/<username>~<actor-name>'
apify api GET '/v2/actors/<username>~<actor-name>/builds?desc=true&limit=5'

In versions, take the entry with sourceType: "GIT_REPO" and note its versionNumber, gitRepoUrl and buildTag. In taggedBuilds, note the build that tag points at. An Actor with no GIT_REPO version deploys with apify push and is outside this skill.

Done when you can name the version, its repository URL, and the build that is live.

Read the log of the newest build of that version:

apify api GET '/v2/actor-builds/<buildId>/log'
Log line Clone link
Cloned commit ID: <sha> Works
Could not read from remote repository Broken

A build from before the trouble started proves nothing. In that case start a fresh one (a deploy) and read its log:

apify api POST '/v2/actors/<username>~<actor-name>/builds?version=<versionNumber>'

Done when a build newer than the trouble shows one of the two lines.

gh api repos/<owner>/<repo>/hooks --jq '.[] | {id, active, events, host: (.config.url | split("/")[2]), last_response_code: .last_response.code}'
gh api 'repos/<owner>/<repo>/hooks/<hookId>/deliveries?per_page=5' --jq '.[] | {delivered_at, event, status_code}'

An Apify webhook has the host console-backend.apify.com (registered by Apify's GitHub App) or api.apify.com (a Build Actor webhook added by hand).

What the repository shows Trigger link
One Apify webhook, latest push delivery 2xx Works
Latest push delivery 400 or 401 Broken: Apify rejects the token in the webhook URL
No Apify webhook Broken: nothing starts a build
Two Apify webhooks answering 2xx Works, but every push starts two builds: the user deletes one

Done when every Apify webhook on the repository is in one row of the table.

A private repository needs the SSH form of the Git URL plus the Actor's deployment key. The user does this:

  1. In Apify Console, open the Actor's Source tab and select the Git version in Version.
  2. Set Git URL to git@github.com:<owner>/<repo>.git and save. The HTTPS form only clones public repositories.
  3. Click the deployment key link below the URL field and copy the key.
  4. On GitHub, open the repository's Settings > Deploy keys > Add deploy key, paste the key, leave Allow write access unchecked, and save.

Confirm the key with gh api repos/<owner>/<repo>/keys --jq '.[] | {title, read_only, created_at}', then start a build (step 2) and read its log.

Done when a build log shows Cloned commit ID with the head of the branch.

First let Apify register the webhook itself:

apify api PUT '/v2/actors/<username>~<actor-name>/versions/<versionNumber>/build-on-push' -d '{"providerId":"github-app","enabled":true}'
  • No error: automatic builds are on. Have the user delete any older Apify webhook that still fails, then go to step 6.
  • invalid-git-auth-token: Apify's GitHub authorization is dead. Use a Build Actor webhook instead; it depends only on the clone link.

For the Build Actor webhook, the user does this:

  1. In Apify Console, open Settings > API & Integrations and select Create a new token. Name it after the webhook, for example GitHub build webhook for <repo>, and copy its value: Console shows a token's value once, at creation, so an existing token cannot be reused here.
  2. On the Actor page, open API > API endpoints, select the new token in the token dropdown, and copy the Build Actor URL.
  3. Check that the URL has token=<the new token> and version=<versionNumber>, and delete waitForFinish from it: GitHub gives a webhook 10 seconds to answer, less than a build takes.
  4. On GitHub, open the repository's Settings > Webhooks > Add webhook. Paste the URL into Payload URL, set Content type to application/json, keep Just the push event, and save.
  5. On the same page, delete every other Apify webhook.

Adding the webhook makes GitHub send a ping, which starts one build: a deploy, so tell the user before step 4, and expect that build in step 6.

Done when the listing from step 3 shows exactly one active Apify webhook.

6. Prove the chain with one push

Push one commit to the branch the version builds from: the default branch, or the one after # in gitRepoUrl. An empty commit is enough:

git commit --allow-empty -m "Trigger build to test the build webhook"
git push

Then check all four:

  • The webhook has one new push delivery with a 2xx status.
  • Exactly one build started after the push.
  • That build's log shows Cloned commit ID equal to the pushed commit.
  • taggedBuilds.<buildTag> points at that build.

Done when all four hold. A failed check sends you back to the step for its link: the first two to the trigger link, the last two to the clone link.

Close by telling the user that a Build Actor webhook carries the API token they created for it: when that token is rotated, deleted or expires, pushes stop building without any notice, and the cure is step 5 again.

Tips for Apify Fix Git Connection

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 6 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Apify Fix Git Connection

What does the Apify Fix Git Connection skill do?

Repair an Apify Actor's broken Git connection - pushes to GitHub that no longer start a build, builds that fail to clone the repository, or a GitHub integration rejected as invalid or expired (for example after Apify API tokens were revoked). Use when a Git-sourced Actor stopped deploying from its repository.

How do I install Apify Fix Git Connection?

Run "npx alyn-cli add apify-fix-git-connection" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Apify Fix Git Connection work in Cursor and Codex?

Yes. Apify Fix Git Connection uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

When should I use the Apify Fix Git Connection skill?

Use when a Git-sourced Actor stopped deploying from its repository.

What is inside the Apify Fix Git Connection skill?

The SKILL.md covers 1. Find the Git version, 2. Diagnose the clone link, 3. Diagnose the trigger link, 4. Repair the clone link, 5. Repair the trigger link, 6. Prove the chain with one push.

What is a good alternative to Apify Fix Git Connection?

Skill Curator by laolaoshiren is the highest-ranked similar skill from another creator, with an Alyn Score of 55 compared to 65 for Apify Fix Git Connection.

Is Apify Fix Git Connection free?

Apify Fix Git Connection is open source on GitHub. It is free to install; check the license before commercial use.

Who made Apify Fix Git Connection?

Apify Fix Git Connection is published by apify in the apify/agent-skills repository, together with 5 other skills.

Similar skills. From other creators.