Git client: Cannot push to private repo not owned by me

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Frank Ralf
Posts: 498
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Git client: Cannot push to private repo not owned by me

Post by Frank Ralf »

Hi,
I am working with a private GitHub repo which I do not own but have write access. I can push to this repo with Sourcetree and from the command line without problems but with the Oxygen Git client I get the following error message:
"You have no rights to push in this repository"
I have reset all credentials and tried both personal access token as well as basic authentication but to no avail. I have read the following posts but could not find a solution. Is there anything else I can try?

Best regards,
Frank

EDIT
Cloning the repo with the Oxygen Git client does not work either.
Frank Ralf
parson AG
www.parson-europe.com
sorin_carbunaru
Posts: 439
Joined: Mon May 09, 2016 9:37 am

Re: Git client: Cannot push to private repo not owned by me

Post by sorin_carbunaru »

Hi Frank,

Just wanted to let you know that I have this thread in my mind, but right now we have our hands quite full with preparing some releases.

I'll get back to you after I get the chance to test a scenario similar to yours. Hopefully later today, but cannot promise...

Thank you for your patience!

All the best,
Sorin Carbunaru
Oxygen XML Editor
Frank Ralf
Posts: 498
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Git client: Cannot push to private repo not owned by me

Post by Frank Ralf »

Thanks, Sorin. It is not that urgent.

Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
sorin_carbunaru
Posts: 439
Joined: Mon May 09, 2016 9:37 am

Re: Git client: Cannot push to private repo not owned by me

Post by sorin_carbunaru »

Hi again,

So, I asked a colleague to add me as a contributor on one of his private projects on GitHub, and I was able to clone the project and push to the remote repo.

I suspect you might have not given the proper rights to the personal access token when you created it. I created a classic token and, to be sure, I selected all rights :). And it worked. By the way, the basic authentication does not work for GitHub. They removed it several years ago.

If you didn't do this, try generating a classic personal access token in GitHub, make sure to give it write permission (or quickly give all permissions), and see how it goes.

All the best wishes,
Sorin Carbunaru
Frank Ralf
Posts: 498
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Git client: Cannot push to private repo not owned by me

Post by Frank Ralf »

Hi Sorin,

Many thanks for looking into this. I used indeed one of the new Fine-grained personal access tokens which I always find a bit tricky to configure correctly. I will try again with a Classic personal access token and report back.

Kind regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
Frank Ralf
Posts: 498
Joined: Thu Jan 23, 2014 2:29 pm
Location: Hamburg
Contact:

Re: Git client: Cannot push to private repo not owned by me

Post by Frank Ralf »

Hi Sorin,

Using a classic personal access token instead of a fine-grained one did indeed solve the problem. I was not aware that classic access tokens provide more features than fine-grained ones (and that they are even still allowed and supported):
Outside collaborators can only use personal access tokens (classic) to access organization repositories that they are a collaborator on.
Source: Managing your personal access tokens

Many thanks for your kind help!
Frank
Frank Ralf
parson AG
www.parson-europe.com
mjlorenzi
Posts: 13
Joined: Thu Jul 11, 2019 12:29 am

Re: Git client: Cannot push to private repo not owned by me

Post by mjlorenzi »

If this feature has been depreciated for many years, why is it still shown as an option - or at least show a message that it is depreciated - I had to come to this forum to figure this out.
image.png
You do not have the required permissions to view the files attached to this post.
sorin_carbunaru
Posts: 439
Joined: Mon May 09, 2016 9:37 am

Re: Git client: Cannot push to private repo not owned by me

Post by sorin_carbunaru »

Hi,

You are absolutely right, the UI/UX should make it clear that basic authentication with GitHub is not possible. I created issue GIT-391 for this.

As a side note, this information is also available in our user manual at https://www.oxygenxml.com/doc/ug-addons ... k1_s3y_kpb. But, yes, this should be made obvious in the application itself, before trying to submit the credentials.

All the best wishes,
Sorin Carbunaru
Oxygen XML Editor
Post Reply