CanineHQ/canine · error · Projects::BuildJob::BuildFailure

Failed to clone repository: #{e.message}

Error message

Failed to clone repository: #{e.message}

What it means

Error "Failed to clone repository: #{e.message}" thrown in CanineHQ/canine.

Source

Thrown at app/jobs/projects/build_job.rb:87

      "gitlab.com"
    elsif provider.bitbucket?
      "bitbucket.org"
    end
    # Bitbucket git clone uses username (not email) with the API token
    git_username = provider.bitbucket? ? provider.username : project_credential_provider.username
    "https://#{git_username}:#{project_credential_provider.access_token}@#{base_url}/#{project.repository_url}.git"
  end

  def git_clone(project, build, repository_path)
    # Construct the git clone command with OAuth token
    git_clone_command = %w[git clone --depth 1 --branch] +
                        [ project.branch, project_git(project), repository_path ]

    # Execute the git clone command with killable support
    runner = Cli::RunAndLog.new(build, killable: build)
    runner.call(git_clone_command)
  rescue Cli::CommandFailedError => e
    raise BuildFailure, "Failed to clone repository: #{e.message}"
  end


  def complete_build!(build, user)
    build.completed!
    notify_build(build.project, build)
    deployment = Deployment.create!(build:)
    Projects::DeploymentJob.perform_later(deployment, user)
  end

  def clone_repository_and_build_image(project, build, image_builder)
    Dir.mktmpdir do |repository_path|
      build.info("Cloning repository: #{project.repository_url} to #{repository_path}", color: :yellow)

      git_clone(project, build, repository_path)

      # Use the Docker builder to build the image
      image_builder.build_image(repository_path)

View on GitHub (pinned to ba4ee3968d)

When it happens

Trigger: Thrown at app/jobs/projects/build_job.rb:87 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of CanineHQ/canine@ba4ee3968d (2026-08-23). Data as JSON: /api/errors/13f83333dc1b46d6. Report an issue: GitHub.