1

I am a beginner in GitHub. I have a silly problem on my desktop Github. It keeps showing me this message:

Authentication failed. You may not have permission to access the repository. Open options and verify that you're signed in with an account that has permission to access this repository.

When I go to my repository> right click> open command prompt> then the windows command prompt is shown. I can type git push, git pull and git fetch and these commands are executed. I want to know why they are not working on the Github desktop software.

3
  • My advice don't use the Github Desktop software only use command line for Github. Another way to do it is to install git onto your IDE, they are usually pre-installed as a plugin. If you really want to use the desktop addition make sure that your account credentials on the actual GUI are correct Commented Jul 20, 2017 at 9:19
  • 2
    apparently you are not logged in or you didn't set the ssh public key Commented Jul 20, 2017 at 9:20
  • 1
    The software was working fine and this problem popped up two days ago for no logical reason! I have reinstalled Git and Github for desktop software but the problem still unresolved!! Commented Jul 20, 2017 at 11:27

4 Answers 4

2
  1. Check if you have generated and added your computer's ssh public key to your account on GitHub.
  2. Check if you logged in your GitHub account on the GitHub desktop app.
Sign up to request clarification or add additional context in comments.

3 Comments

Github desktop was working fine previously. This problem suddenly popped up two days ago! I have checked my ssh public key and my credentials and the problem is not resolved. I have cloned a repository belonging to someone else recently. Is that related to the issue? I have then deleted that repo from my Github.
@MagedSaeed I guess no. But you had access to the repository from someone else, right? Maybe you should try to delete the public key from your github account and copy and paste it and try it again.
The problem is not resolved. I just switched to another software, source tree. Thanks, I appreciate your effort.
2

Signing out and signing back in worked for me. File > Options > Accounts > Sign Out

Comments

0

I was having issues with this and was able to get it to work. I had multiple issues.

  1. Make sure Windows Defender or your AntiVirus is not blocking git.exe
  2. Using Git Bash, check for a certificate. ls -la ~/.ssh/
  3. copy the id_rsa.pub contents and a deploy key into github.
  4. put the id_rsa into your ssh-agent that you will need running on windows

When you setup the git remote repo, make sure you are using https:// and not ssh.

After doing all of that, mine just started working.

Comments

0

This problem occurs while cloning a git url for example when the git projects URL to be cloned has (ssh format) something like this - [email protected]:abc/test.git

whereas it should be in the below format -

https://github.com:abc/test.git

make sure you have not selected the "Clone with SSH" option in the git browser which should be "Clone with https"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.