Logo Knowledge
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  • Product Documentation
  • Insight
  • Developer Center
  • Training
  • Submit a Request
  1. Acquia Support Knowledge Base
  2. Troubleshooting
  3. Common Problem

Troubleshooting Git on Windows

    See more
    • Updated
    • December 16, 2020 19:51

    Permission denied (publickey).

    When using Git on the command line on Windows, you may encounter an error like this:

    C:\Users\Local Administrator\Sites\devdesktop\yoursubscription-dev\docroot>git push 
    yoursvn-12345.prod.hosting.acquia.com: Permission denied (publickey). 
    fatal: Could not read from remote repository.

    One way to find out which key it is using, first run this command:

    git config core.sshCommand "ssh -vvv"

    This tells the SSH command that Git needs to run in very, very verbose mode. This will tell you the location(s) that SSH is looking into find the public key. If your copy of Dev Desktop is able to push, then you have the correct public and private key pair installed.

    To find out the location of your private key:

    1. Make a backup of the public and private key pair that SSH is looking at. If it doesn't exist, that's fine. The following steps will set it up in the right place.
    2. Go to Dev Desktop's preferences.
    3. Copy the location in "Private key" to your clipboard
    4. Run the following command in the terminal. Replace [location of your private key] with the location. Keep the quotes but lose the brackets.
    git config core.sshCommand 'ssh -i "[location of your private key]"'

    Git error: Invalid path  'docroot/vendor/example/example-dependency/ (in Acquia Dev Desktop)

    You may have to add those files manually:

    1. Click the Acquia Dev Desktop terminal button.
    2. Run git status on the folder to see what files need adding.
    3. Run git add [path] on each path that is not staged.
    4. Run git status again to see what will be added.
    5. Run git commit -m "[Descriptive message here.]"
    6. Run git push

    External Links

    • How do I tell Git for Windows where to find my private RSA key?
    • How can I run git push/pull commands with SSH verbose mode?
    Avatar
    Richard Eriksson
    • December 16, 2020 19:51
    • Updated
    • Facebook
    • Twitter
    • LinkedIn

    Was this article helpful?
    1 out of 3 found this helpful

    Return to top

    Related articles

    • Troubleshooting "Permission denied (publickey)" SSH errors
    • Acquia Cloud Platform task failing because of a "permission denied to execute" error
    • Permission denied or other errors during BLT sync or drush sql-sync
    • How to add a new site to a multisite on Acquia Cloud Professional or Enterprise without Acquia BLT
    • File permissions while using Acquia Cloud

    Support

    Acquia Support Knowledge Base
    • Submit a Request
    • Contact Support
    • Acquia Support Guide
    • Product Documentation
    • System Status

    About Acquia

    • About Us
    • Leadership
    • Board of directors
    • Newsroom
    • Careers
    • Customers
    • Contact Us
    53 State Street, 10th Floor
    Boston, MA 02109
    United States
    Phone: 888-922-7842
    Map: Google Maps
    View other locations
    • Feeds
    • Legal
    • Security Issue?

    Copyright © 2018 Acquia Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.