eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Git-credentials secret is not updated when a workspace is restarted from IDE #22328

Open RomanNikitenko opened 1 year ago

RomanNikitenko commented 1 year ago

Describe the bug

Git-credentials secret is updated when I restart a workspace from the dashboard. But it doesn't work when I restart a workspace directly from IDE. It redirects user to the Github authorization page, but it doesn't create the corresponding git-credentials-secret. User has to restart the workspace once again to get git-related commands working.

Che version

next (development version)

Steps to reproduce

  1. Create a workspace from a git-repo.
  2. Go to the dashboard => Git Services and revoke Github token
  3. Go to the Openshift console and remove git-credentials-secret + presonal-access-token
  4. Come back to the IDE and restart the workspace directly from the IDE using Restart Workspace action
  5. Confirm authorization when it redirects you on the corresponding page.
  6. Check Openshift console if there is git-credentials-secret (I guess - there is no such secret)
  7. Try to use Git clone command.

Expected behavior

Git-credentials secret is updated when I restart a workspace from the dashboard. So, it should work the same way from the IDE.

Runtime

I tested it on the dogfooding instance

Screenshots

https://github.com/eclipse/che/assets/5676062/ba9c3978-a0c4-4fef-8221-46e85e4bb705

RomanNikitenko commented 1 year ago

to be honest I don't understand what the cause of the problem can be here

For both cases (dashboard and IDE):

it looks like it does the same steps, but for the dashboard it works, for the IDE it doesn't... so, I think che-server side should be investigated for that use case

che-bot commented 11 months ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

che-bot commented 1 day ago

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.