che icon indicating copy to clipboard operation
che copied to clipboard

403 error, not able to do git push to upstream dashboard branch with https

Open dkwon17 opened this issue 2 years ago • 0 comments

Describe the bug

On a Che instance with oAuth set up, I'm not able to push branches to https://github.com/eclipse-che/che-dashboard/.

Che version

next (development version)

Steps to reproduce

  1. Create a project with this devfile https://github.com/dkwon17/che-dashboard/blob/devfilev2/devfile.yaml ex:
{CHEHOST}/#https://raw.githubusercontent.com/dkwon17/che-dashboard/devfilev2/devfile.yaml
  1. When the editor starts, run git checkout -b test-branch
  2. Create a git commit
  3. Try to push to the upstream remote with git push upstream test-branch

This results in the following:

bash-4.4$ git push upstream test-branch
remote: Permission to eclipse-che/che-dashboard.git denied to dkwon17.
fatal: unable to access 'https://github.com/eclipse-che/che-dashboard.git/': The requested URL returned error: 403

Expected behavior

Should be able to push to remote

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

other (please specify in additional context)

Eclipse Che Logs

No response

Additional context

I experience this issue in the dogfooding instance

dkwon17 avatar Aug 09 '22 13:08 dkwon17

This is an expected behaiviour because OAuth App access restrictions are enabled by default in a GitHub organisation. To request the access:

  1. Review authorized OAuth Apps in your GitHub account page.
  2. Find the related oAuth app in the list and click it: screenshot-github com-2022 08 16-15_41_19
  3. Request access for the eclipse-che organization: screenshot-github com-2022 08 16-15_43_30

vinokurig avatar Aug 16 '22 12:08 vinokurig

Honestly that doesn't seams like a big deal as usually developers fork a GitHub repository and git push to their fork rather than to a dedicated branch of the upstream repository.

l0rd avatar Aug 16 '22 14:08 l0rd

It seems there is nothing to fix, can we close the issue and suggest to create a fork and do push commands into that fork? @vinokurig @dkwon17 WDYT?

svor avatar Aug 27 '22 07:08 svor

I think we can close this issue, although, the procedure described here https://github.com/eclipse/che/issues/21627#issuecomment-1216592765 would have to be done to make PRs to che-dashboard since at least for now, the PR checks are done only for PRs made from branches on the upstream repo (eclipse-che/che-dashboard)

dkwon17 avatar Aug 29 '22 13:08 dkwon17