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.

[Bug]: Initialise Repository using Source Control - Fails

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Mac Catalina
  • Remote OS: Ubuntu 20.40
  • Remote Architecture: Linux Box on Digital Ocean amd64
  • code-server --version: 4.4.0

Steps to Reproduce

  1. Initialise Repository the “Initialise Repository” in the “Source Control” Panel

Expected

For source control to show the files

Actual

it creates the git folder and config files etc, but does not reload and show files or the ui for git management, even when I reload the page is does not work. Git is installed, it fresh install of ubuntu and code-server.

it just shows

Screenshot 2022-05-27 at 14 09 59

I even setup a new server to check, same issue

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
GL007commented, May 31, 2022

Ok so I found the issue, it is to do with the new security of git

If you run “git show” in terminal after “Initialise Repository” you will get

fatal: unsafe repository (‘/xxxxxxx/xxxxxxxxx/’ is owned by someone else)

you need to run

git config --global --add safe.directory /xxxxxxx/xxxxxxxxx/

Then refresh the browser, that should do it

@tujeff , hope this helps

1reaction
tujeffcommented, May 31, 2022

I’ve found the issue. My file permissions were messed up here, caused all the errors.

Screen Shot 2022-05-31 at 8 24 10 AM

Thank you for your time to help me, and your hard work !!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source Control not working · Issue #138278 · microsoft/vscode
Open the SCM viewlet and click on the "Initialize Repository" button. If it fails, can you please share the contents of the git...
Read more >
Failed to init source control in vscode - Stack Overflow
Try and open VSCode from command line, in the root folder of your repository: cd c:\path\to\repo "%LOCALAPPDATA%\Programs\Microsoft VS ...
Read more >
Error Failed to enable Git source control. You need to initialize ...
I was trying to setup a project to work with a github, but messed things up, so I removed .git directory as well...
Read more >
Initialise repository for Git Flow failed in sourceTree 2.1.2.4
I got below error when I tried to initialize repository for Git Flow. I did switch Git by using embedded Git and System...
Read more >
Source Control Bug - Forcing Git when TFS was selected
I have a project that I am trying to load into TFS, however Visual Studio keeps using Git even though TFS is selected....
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