question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I can't connect to my own repository; I have never changed the default security settings.

See original GitHub issue

I am trying to setup my local Git repository so I can push updates to my GitHub repository. I am currently logged into GitHub, on the same machine that my local Git is on. I just went through the steps in the desktop app, (yes I am signed into the app with the same account) and was able to stage and compare, but I cannot commit; I get a message saying I don’t have permission?? It’s mine! I looked everywhere in GitHub settings, I don’t see any additional permissions I could possibly give myself.

“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.”

GitHub Desktop Version 0.7.2 Windows 10

GitHub Desktop version: 0.7.2

OS version: Windows 10

Steps to Reproduce

  1. Log into GitHub Desktop
  2. Add local repository
  3. Write summary and description
  4. Leave default branch: master
  5. Click “Publish branch”
  6. Receive error 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.”

The help documentation had nothing to suggest that I did not already do.

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Reproduces how often: [What percentage of the time does it reproduce?]

Logs

No log was generated today.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:21 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
shiftkeycommented, Aug 13, 2017

@I-keep-trying there’s a couple of things I’d like you to check to confirm nothing unexpected is occurring with your setup:

  1. From the app, could you open View | Toggle Developer Tools when this occurs and share the underlying error? It should be logged to the console.

  2. From the app, could you open File | Options and confirm you have a GitHub account registered? This is what my setup looks like:

  1. From the Start Menu, could you open Credential Manager, select the Windows Credentials tab and see if there are any GitHub credentials listed under the “Generic Credentials” group? This is what it looks like on my machine:
0reactions
mattkeffordcommented, May 27, 2021

@I-keep-trying I’m glad you were able to work around the issue!

Is SSH remote for using over command line? And HTTPS for the desktop app?

Both SSH and HTTPS are supported over the command line. We haven’t spent much time on SSH support in the Desktop app, but if you have an external setup it can be detected.

HTTPS authentication and SSH authentication differ in a few ways:

  • HTTPS credentials are stored by a credential manager configured in Git, SSH keys are managed external to Git by an agent process
  • HTTPS credentials are usually specific to a server (account-based), SSH keys - once the public key is shared like you added it to GitHub - can be used across many servers (identity-based)
  • HTTPS authentication is done for each connection (simpler, but limited), SSH authentication is done for each session (multiple commands can be run in a session, more complex to manage, but SSH is a well-known protocol)

Where is SSH configuration done?

We have a guide for doing this yourself, but I haven’t tested that this integrates nicely with Desktop - I expect this to work, but maybe I’ve missed something.

OK, just for the sake of being thorough, I looked around, and I cannot see anywhere, either in the desktop app settings, nor in the settings for any repository, nor in my GitHub profile settings, where I would go about doing SSH remote configuration. I don’t even know what that is, let alone how to change it to HTTPS.

So the thing you’re looking to configure is all specific to your local machine and covered by the guide I linked to above:

  • you have an SSH public/private keypair on your machine
  • the public key is added to GitHub, so GitHub knows who you are
  • ssh-agent process is running, to handle requests from Git when connecting to GitHub over SSH
  • your ~/.ssh/config entry points to your SSH keys

It’s not the most user friendly experience, which is why Desktop will default to cloning over HTTPS. But we’ve had some pain points that users have encountered when dealing with SSH remotes, I’m going to roll them up into an issue this week and see if we can make this better.

Thanks for all the details, and best of luck in your adventures! Let me know if there’s any other questions you have around this…

Hi, I tried following your steps but I still have the error message shown in GitHub Desktop “The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.”

I can access the repo from the command line, just not through GitHub Desktop which is a bit annoying.

I have generated the new SSH key and added it to my GitHub account but I don’t see any step for making GitHub Desktop use the new SSH key?

I am on Ubuntu so I cannot use the alternate ssh program as suggested by steveward

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting cloning errors - GitHub Docs
To fix the error, you'll need to be an administrator of the repository on GitHub.com. You'll want to change the default branch of...
Read more >
Default and custom security groups - AWS Documentation
The following are the default rules for a security group that you create: Allows no inbound traffic.
Read more >
Cannot push to Git repository on Bitbucket - Stack Overflow
After creating new project in Bitbucket, use clone. Enter cloning command in terminal and it should clone empty project to your computer. After ......
Read more >
Repository mirroring - GitLab Docs
Could not read username: terminal prompts disabled · On the top bar, select Main menu > Projects and find your project. · On...
Read more >
Repo Command Reference | Android Open Source Project
repo / directory with Git repositories for the Repo source code and the standard Android manifest files. Options: -u : Specify a URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found