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.

git-credentials-secret mount path is hardcoded to theia user directory

See original GitHub issue

Describe the bug

After configuring oAuth for GitHub, credentials secret git-credentials-secret is appeared in the user namespace. The secret has a hardcoded to /home/theia/.git-credentials mount path. This is ok for theia editor, where the home directory is /home/theia, but in che-code editor this doesn’t work because it knows nothing about theia.

Che version

next (development version)

Steps to reproduce

  1. Configure GitHub oAuth: https://www.eclipse.org/che/docs/next/administration-guide/configuring-oauth-2-for-github/
  2. Create a factory with a private project e.g. <che-url>/dashboard/#<url to a private github project>
  3. Stop the factory workspace and start a che-code workspace: <che-url>/dashboard/#https://github.com/benoitf/codetogether-che-petclinic

See: the credentials file is located in /home/theia/.git-credentials/ folder

Expected behavior

The github credentials file must not be mounted to the hardcoded theia user directory.

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

macOS

Eclipse Che Logs

No response

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
vinokurigcommented, Apr 26, 2022

Will merge after release

0reactions
amisevskcommented, Apr 20, 2022

👍 to using /.git-credentials/credentials by default, it should be an easy change (just change the annotation used when creating the secret.

The alternative would be to have che-code resolve the proper path from gitconfig; I don’t know how hard that would be.

Read more comments on GitHub >

github_iconTop Results From Across the Web

.vscode vs .theia folder - Theia Community
Hi, The debug pane read launch.json from .vscode folder, while the tasks only read it from .theia folder.
Read more >
unable to parse existing azurerm_postgresql_server resource
git-credentials-secret mount path is hardcoded to theia user directory, 6, 2022-04-18, 2022-10-12. Try create a middleware, 6, 2021-08-12, 2022-10-29.
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