[Bug]: Initialise Repository using Source Control - Fails
See original GitHub issueIs 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
- 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
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:
- Created a year ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
I’ve found the issue. My file permissions were messed up here, caused all the errors.
Thank you for your time to help me, and your hard work !!