Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

`ssh-add -l` returning "Error connecting to agent: Bad file descriptor"

I have Googled this six ways to Sunday, but cannot find any answers for this particular issue.

What's killing me about this is that last week, this was working just fine! And now, this is happening. 

I open a Git Bash, and here's the 'log' of what happens.

.bashrc running...
in the if condition...
Initializing new SSH agent...
Identity added: /c/Users/Scott/.ssh/AqweevaBB_id_rsa (Scott@MALP04)
.bash_profile run and done.

Scott@MALP04 MINGW64 /c/Dev/Aqweeva/repos/netgcs_web_main_api (develop)
$ git status
On branch develop
Your branch is up to date with 'origin/develop'.

nothing to commit, working tree clean

Scott@MALP04 MINGW64 /c/Dev/Aqweeva/repos/netgcs_web_main_api (develop)
$ git ls-remote Permission denied (publickey).
fatal: Could not read from remote repository.

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

Scott@MALP04 MINGW64 /c/Dev/Aqweeva/repos/netgcs_web_main_api (develop)
$ ssh-add -l
Error connecting to agent: Bad file descriptor

So if anyone can tell me what to try next, I'd really appreciate it. (I've gone through all of the steps I can find for the `Permission denied (publickey)` error, and nothing seems to get rid of that dang Bad file descriptor error.)


1 answer

1 accepted

0 votes
Answer accepted

Well, apparently the path to the dang `ssh.exe` in my `.gitconfig` was pointing to a bad (perhaps out of date) EXE. I changed it to the actual Git for Windows version/instance and all is working again.


Excuse me,could you please tell me what is the direction of the file '.gitconfig' and how should i change it?


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events