Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6942201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:59:02+00:00 2026-05-27T12:59:02+00:00

I am able to use ssh (i.e., for ‘git’ with heroku or github etc.)

  • 0

I am able to use ssh (i.e., for ‘git’ with heroku or github etc.) through GitBash, but I cannot do the same from Windows cmd prompt on the same machine. What can be the problem? If I recall correctly, it used to work from cmd prompt.

The error I’m getting is:

Permission denied (publickey). fatal: The remote end hung up unexpectedly

I got both logs: here is last four lines from cmd which are different from ‘git bash’:

debug1: Trying private key: /.ssh/identity
debug1: Trying private key: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).

in case of Git bash: the respective lines are:

debug1: Trying private key: /c/Users/user1/.ssh/identity
debug1: Offering public key: /c/Users/user1/.ssh/id_rsa
debug1: Remote: Forced command: gerve user1
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.

Resolved

As hinted by @snemarch, setting following env var solved my problem:

set HOME=C:\Users\user1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:59:03+00:00Added an answer on May 27, 2026 at 12:59 pm

    Since you are using GitHub, from cmd try

    ssh -v -T git@github.com
    

    See the keys that it is presenting. Maybe try from Git Bash also and compare the output.

    This could be because %HOME% is not correctly set. Set it to the directory that contains your .ssh directory ( and hence the keys)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Until today, I have been able to use bzr pull server:path/to/trunk , but today
I need to be able to ssh from a Java program into a remote
I want to use the Post-Receive URLs Service Hook on github but I don't
I have an app that needs to be able use either an sqlite3 datebase
I am not able to use the breakpoint in Studio with Javascript. I'm able
I am able to use the NHibernate Criteria API for an IN statement using
Requirements: Must be able to use C strings as well as C++ strings Fast
The init() is able to use the parameter passed to it in this example:
I need to be able to use https to connect to a server and
I want to be able to use mklink to create symbolic links on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.