---
title: "How do I resolve a code push error?"
date: "2025-05-27T09:51:58+00:00"
summary: "Troubleshoot and resolve code push errors in Acquia Cloud Platform with step-by-step solutions for common issues."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/69331-how-do-i-resolve-code-push-error"
id: "65e49d62-ef37-4327-b563-5d74a934a653"
---

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Deploy Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-deploy-drupal-stage)

[Deploy Branch to Acquia and Deploy Tag to Acquia jobs](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-deploy-branch-to-acquia-and-deploy-tag-to-acquia-jobs)

`In PushArtifactCommand.php line 100: [Acquia\Cli\Exception\AcquiaCliException] Pushing code was aborted because your local Git repository has uncommitted changes. Please either commit, reset, or stash your changes via git.`

Application

Customer

**Potential cause**

Directories are committed in the codebase. Git must ignore the directories so that Composer can add them during the build.

**Solution**

Update the `.gitignore` file in the root directory of your project so that Git ignores the proper directories. The recommended `.gitignore` file is located [in this location](https://github.com/acquia/drupal-recommended-project/blob/master/.gitignore).

If Git does not ignore the pushed or tracked files even after updating the `.gitignore` file, run the following commands from the root directory of your project:

*   `git rm -r --cached .`
    
*   `git add .`
    

After executing the commands, the system displays all the files that are ignored by the current `.gitignore` file in staged changes.

Note

The system does not remove the files from your local machine during the commit process. The system removes the files from other developers' machines when they run `git pull`.

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Deploy Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-deploy-drupal-stage)

Build artifact from branch/tag

`Permission denied (publickey).`

`fatal: Could not read from remote repository.`

`Please make sure you have the correct access rights and the repository exists.`

Platform

Customer

**Potential causes**

*   The user is not a member of the Cloud Platform subscription.
    
*   The user's [role](/acquia-cloud-platform/working-roles-and-permissions "https://docs.acquia.com/acquia-cloud-platform/access/teams/roles") in Cloud Platform does not have access to push code.
    
*   Cloud Platform has an issue.
    

**Solutions**

*   Confirm that the user is a [member](/acquia-cloud-platform/managing-team-members "https://docs.acquia.com/acquia-cloud-platform/access/teams/members") of the Cloud Platform subscription.
    
*   Confirm that the user's [role](/acquia-cloud-platform/working-roles-and-permissions "https://docs.acquia.com/acquia-cloud-platform/access/teams/roles") in Cloud Platform has access to push code.
    
    For more information, see [Managing users, teams, roles, and permissions](/acquia-cloud-platform/managing-users-teams-roles-and-permissions "https://docs.acquia.com/acquia-cloud-platform/access/teams").
    
*   Verify that Cloud Platform does not have an issue.
    
    For more information, see [Acquia, Inc. Status](http://status.acquia.com/).
    

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

N/A

N/A

`git@gitcode.acquia.com: Permission denied (publickey,keyboard-interactive). fatal: Could not read from remote repository.`

`Please make sure you have the correct access rights and the repository exists.`

N/A

Customer

**Potential cause**

If you cannot push code from your Cloud IDE or local development environment to your Code Studio repository due to this error, you must update your `git remote` to use the HTTPS URL instead of the SSH URL.

**Solution**

Update your `git remote` to use the HTTPS URL of your repository.

To find the HTTPS URL:

1.  Navigate to your Code Studio project.
2.  Click **Clone**.
3.  Click the **Copy** icon to copy the value specified in the **Clone with HTTPS** field.

![Clone with HTTPS](https://acquia.widen.net/content/ef631d93-8dde-4e0d-b176-35944303231e/web/86cd4_code-studio_clone-with-https.jpg?h=387&itok=LIHUecM_)

To update your `git remote`:

1.  Remove the current `git remote` from your Cloud IDE or local development environment.
    
    If your remote name is `origin`, run the following:
    
        git remote remove origin                                                                                                                                               
    
2.  Add the new remote using the copied HTTPS URL.
    
    If you want your remote name to be `origin`, run the following:
    
        git remote add origin <URL>