github desktop not allowing sync to remote repository - no access or repo deleted or renamed - github

We are having an issue with syncing on Github Desktop.
We have a team of 4 members and a company setup in Github.
One of our members can sync the repos he has already worked on before but when I create a new repo for our company, so all members can access it, I can sync but one of the members who is working on the project keeps getting an error
https://github.com/companyname/reponame.git/ doesn't seem to exist any more.
You may not have access, or it may have been deleted or renamed
I have tried to research this but not been able to get any direction, where to go?

Thank you everyone for posting and helping.
I have found the solution and it's a big oversight on my part.. Remember when you create a Repo with team member access, you MUST give then access to WRITE as Git sets default to READ only. When syncing, git desktop does not make it clear that its a permissions issue..
Here is where the READ/WRITE permissions are located on the Github site once you are logged in.
Thank you all.

Double-check that:
the right account for that user has been added as a collaborator for your repo (or your GitHub organisation).
said user is not using a credential helper which would have cached another GitHub account
git config credential.helper

Related

Azure DevOps: Unable to create branch in specific path

I'm suddenly unable to create a branch under our releases folder. I'm a project administrator and my permissions seem to allow me to. My colleague is able to and he is also a project administrator.
Error:
It should also be noted that I get the same error trying to do it via CLI.
Checking repository permissions, I see these security permissions on All Branches (these are mine):
Checking the security permissions on the releases folder itself, I see this (also my permissions):
Looking at my colleagues permissions on the releases folder itself, I see this:
Any ideas on why I'm suddenly not able to do this branching? I can branch to any other location on the repo (root, other folders, etc).
Update 1/4/2023:
Per promico's suggestion, I ran the tf git permission and found no denials.
Have you checked this visualstudio topic:
https://developercommunity.visualstudio.com/t/unable-to-create-new-branch-git-error-vs403660/1049986
I don’t know how accurate this info is, but with tf.exe git stuff like this can be done and undone, it might help since your problems are locally.
https://msftplayground.com/2019/03/meet-the-specified-naming-conventions-in-azure-devops-git/
https://learn.microsoft.com/en-us/azure/devops/repos/tfvc/git-permission-command?view=azure-devops
UPDATE
Can it be that your account has more group memberships then your colleague? I made myself part of another group with a deny on creating a branch and got this message:
A deny outweighs your administrator allow.
Of course your problem is not CreateBranch, it clearly states ref naming convention, but combining this with my earlier answer:
Are you part of other groups then your colleague?
Did you verify the permission on this repo with tf git permission?
I still think it is in the corner of tf git permission...
Jesse Houwing wrote a blog post about crunching these permissions, which also could be handy:
https://jessehouwing.net/azure-devops-git-setting-default-repository-permissions/
2nd Update
For the repo, but also for all repos a detailed permission report can be downloaded (via a request):
Maybe this json report contains the info to solve this?
Figured it out after my colleague reminded me that months ago I had restricted who could create branches under releases as we had one dev who wouldn't stop making patch branches under it. Contributors were not allowed to create branches under releases, but Release Administrators could. It would seem that some teams/permissions tidying changed something somewhere in my permissions that I lost the permission even though I'm in both. For context, my colleague that could still create releases branches is also in both so he must have an elevated permission somewhere that I don't.
Regardless, I found the permission by running this command from a dev powershell:
tf git permission /collection:https://[REDACTED] /teamproject:[REDACTED] /repository:[REDACTED] /branch:releases
That returned a list of permissions specific to the releases branch and included:
I followed up with a command to re-enable the CreateBranch permission for Contributors:
tf git permission /collection:https://[REDACTED] /teamproject:[REDACTED] /repository:[REDACTED] /branch:releases /allow:CreateBranch /group:[REDACTED]\Contributors
Thank you, #promicro, for helping this along! Appreciate the effort!

GitHub - How to clone repository on a shared server without giving access too all my repos

My question is the same as Github add SSH key from others will grant access to all repos?, except my use case is that I am working on a shared server with other contributors. We all need access to a certain repository on this server. However, since GitHub requires SSH now, how can I clone and use the repository without adding my SSH key to the server and allowing everyone else access to all of my personal repositories?
I have already added my teammates as contributors in the repo we want to clone; it would be nice if we could each individually use our username and passwords to interface with the repo (like the old HTTPS method of cloning git repositories) without having to share our private keys with each other. If there is an option to only allow SSH access to a specific repo, that would be nice as well.
The only workaround I can think of right now is to create a dummy GitHub account with the sole purpose of accessing this repo, and registering our SSH key with that GitHub account. But this seems very contrived and I'm wondering if there is a better solution to this problem.
A dummy github account with only the right permissions to access the one repo is what GitHub calls a Machine Account and is the recommended way to provide access under scenarios like these.
Alternatively, you could use a deploy token, those are bound to a single repo by default.

Push to GitHub repo with another user

I have on my Mac two GitHub users, one is for work and another is personal. I set them up following this tutorial:
https://medium.com/#ibrahimlawal/developing-with-multiple-github-accounts-on-one-macbook-94ff6d4ab9ca
I created a repo with my personal account, and tried to do a push with the work account, and to my surprise, it let me do this. I thought it should stop me from doing it because the work user should not have access to the personal GitHub. How can I avoid it? I want to be able to push to a personal repo with only my personal account, and to my work repos only with my work account.
The article is about managing two different SSH keys.
But if you can push, it might be because:
you are using an HTTPS URL
your work account credentials were cached (git config credential.helper: probably credential-osxkeychain on Mac: see "clear all Git credentials").

Not using Github anymore - Sourcetree keeps asking for password

I've moved my repositories from Github (where they were created) to Bitbucket and have been working happy for a while. Every now and then Source Tree asks for my Github password.
My Local Repositories pages doesn't have any repos that are on Github.
My Remote Repositories doesn't have any repos on it.
My Tools>Options>Authentications page doesn't have any Github accounts.
Are there other places I need to remove my Github account from?
What might be causing this?
Why is it asking?
I had the same issue- I migrated a repository from GitHub to Bitbucket, and then removed the account from Tools>Options>Authentication. I then started getting a periodic prompt for my GitHub account.
I still had the GitHub repo bookmarked in SourceTree, and once I removed the bookmark the prompts stopped.
Are you running windows? If so you might want to uninstall your git-credential-manager and check to see if your windows credential manager has an entry for github. If so delete that too.

github desktop error “The repository does not seem to exist anymore. You may not have access, or it may have been deleted or renamed.”

I have installed GitHub Desktop as the uploaded local project tool, I uploaded a project "F:/test", and it could show successful in my GitHub homepage, then I delete this repository.
But I re-publish this project to GitHub.
Github Desktop shows this history of the repository, and prompt error
The repository does not seem to exist anymore.
You may not have [enter access, or it may have been deleted or renamed
How can I get past this error message?
This error was keeps on occurring to me. Turn out I was not added as the Contributor on the GitHub project.
The repo owner should be able to see and list of Contributor for the project. You can request him to add you in contributor list and this error will disappear.
I was facing the same issue, I simply sign out from Github Desktop app in File > options > Signout
In my case I accidentally changed the push Url, so I executed:
git remote set-url --push origin https://github.com/username/repo.git
After that I checked with:
git remote show origin
your Fetch Url and Push Url must look like the same URL where you cloned the project.
As shown in this error, it is the result of an invalid local path. Either because it includes invalid characters, or because you don't have write/admin access to it (read access is not enough).
If you can, clone again that repo in a different path and open it with GitHub Desktop, and see if the issue persists.
I had the same issue. I deleted my repository from remote as well and then recreated.
If you aren't worried about the change trace being lost, then you can simply remove the .git folder (you will need to enable hidden files in windows) and then re-initialize the repository in the project folder.
This resolved the problem for me!
In my case I have used more than one account. Just sign out from GitHub Desktop and sign in back to the specific account. You might sign out any logged GitHub session on the default web browser if the account is not what you want.
Since I had a forked repository, I had spelled my url wrong in
github desktop -> repository -> repository settings...
I had a link called github.com/myname/myproject.it
but instead of it I hade to write git.
github.com/myname/myproject.git
I was logged in with the wrong account! I had to sign out of Github in the browser first, then sign out in Github Desktop and re-sign in