I am running into weird issue with Vscode integrated terminal.
It cannot find a git repository, while my normal linux terminal finds it perfectly fine.
Below image clearly tells the problem. What might be the issue here?
I had the same issue and what worked for me is to disable Git: Terminal Authentication in the settings. It will prompt the username and the password in the terminal. Hope that this solution/workaround is good for other people.
From this site I found this solution/workaround:
https://github.com/microsoft/vscode/issues/136970
I have had a few strange issues with VSCode git integration versus working in the integrated terminal.
For example, sometimes the git integration in VSCode and and in the terminal disagree with each other, and sometimes the terminal's history is apparently corrupted by VS Code. See my question here: Why do I get a different git status in a shared folder when logged in on a local VM?
I haven't entirely sorted out why this occurs, so I can't guarantee that it is the same problem as you are finding, but it could be related.
Related
I am using Mac OS as my main operating system. I installed fedora 37 server edition in a VMware workstation as part of my course in college. I am trying to customize my prompt using this repo https://github.com/andresgongora/synth-shell.
I have installed git already. I also have power line-fonts installed. The issue I am having comes with this command: git clone --recursive https://github.com/andresgongora/synth-shell.git
When typed and executed I get a prompt asking me for a GitHub username and password. I enter my credentials and I get an error stating "Authentication Failed for https://github.com/andresgongora/synth-shell.git" even though my credentials are correct.
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global username and that doesn't work either.
Am I supposed to log in to my GitHub before cloning this repo? Does anyone else experience this or have a workaround?
I have tried putting my username and password (both combinations separately) and I get an event error. I configured a global git username and that doesn't work either.
Sites used:
Can't clone a github repo on Linux via HTTPS
https://docs.github.com/en/get-started/getting-started-with-git/setting-your-username-in-git
https://documentation.red-gate.com/soco/troubleshooting/authentication-failed-when-cloning-from-github
Edit: I have also tried setting up a token to log in with. The only issue I am having is my linux distro does not support copy and paste so I am having to type everything out. When the password prompt comes up everything is blank to hide your password so I can't even check for spelling errors.
As of mid 2021, github the company is now enforcing git HTTPS authentication to use an access token rather than username+password. See this stackoverflow answer for full information.
One way forward is to generate an SSH key, and upload the public portion to github.
It warrants mentioning that this change is specific to Github Inc., the Microsoft subsidiary. There have not been any changes to git, the distributed version control system. Other, similar repository hosting services may not necessarily bar you from authenticating via username+password. Gitlab is one example.
I managed to fix my issue by using cockpit in my web browser. Doing this allowed my to copy and paste my information and everything worked first try.
Beginner problem.
I am using the Remote-ssh extension with VS Code (Insiders) to connect to an AWS Linux server. This connection is authenticated with a SSH key stored on my local machine. After I connect, a terminal titled "install" is opened and the following is the output:
685ad2d6d150: running
Acquiring lock on /home/ubuntu/.vscode-server-insiders/bin/45aafeb326d0d3d56cbc9e2932f87e368dbf652d/vscode-remote-lock.ubuntu.45aafeb326d0d3d56cbc9e2932f87e368dbf652d
Found existing installation at /home/ubuntu/.vscode-server-insiders/bin/45aafeb326d0d3d56cbc9e2932f87e368dbf652d...
Checking /home/ubuntu/.vscode-server-insiders/.45aafeb326d0d3d56cbc9e2932f87e368dbf652d.log and /home/ubuntu/.vscode-server-insiders/.45aafeb326d0d3d56cbc9e2932f87e368dbf652d.pid for a running server
Looking for server with pid: 79962
Found running server...
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
*
Checking server status on port 45093 with wget
685ad2d6d150: start
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==45093==
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==86be68cd-ee77-49dc-ae26-5c1521022c2c==
685ad2d6d150: end
(this print is after the initial install and reconnecting to the server, but the output is about the same)
Afterwards the "install" terminal remains open. If I close it, then it seems my connection is interrupted and trying to open a file, or another Bash terminal reopens the install terminal.
If I open a direct connection to the user directory, I get the following warning:
If I open a connection from within a git repository directory I don't get that warning.
My question is, is the vscode-server-insiders "install" finished? Is the "install" terminal supposed to remain open the entire time? If I close the "install" terminal, is it supposed to break the connection and reopen? Is the warning that shows up because I am not in a git repository directory? Should I be getting that warning? Or is this all the normal process of remotely connecting via ssh with VS Code?
Sorry, I have Googled, but have not seen anything referencing that this is the regular behavior of using the Remote-ssh extension. I feel like if the vscode-server-insiders installation was completed that the "install" output in the terminal should go away. But it seems to hang after the connectionToken==86be68cd-ee77-49dc-ae26-5c1521022c2c==4134564d6c5d: end output. Just trying to figure out if this is indeed what is supposed to happen.
UPDATE 1: As mentioned by #VonC, it appears that the install process is indeed hanging. I had already looked at the Troubleshooting hanging or failing connections documentation and added "remote.SSH.showLoginTerminal": true, "remote.SSH.useLocalServer": false to my settings file, but it doesn't seem to make a difference. Nothing shows up in the output log for the Remote-ssh extension. There are a lot of pty errors in the developer's console, but nothing else that looks like it could be making the install process hang. So, does anyone have any clues as to why the install process is hanging?
UPDATE 2: Setting remote.SSH.showLoginTerminal to false doesn't show the "install" terminal at all. But is this hiding the terminal and the issue, or is this actually solving the issue? It appears that the "Checking server status..." step was what was hanging in the process, but I could still use a bash terminal and open files. I can also still do all that with remote.SSH.showLoginTerminal set to false. I am using a ssh key and I am not using a password to login. I guess now I am more curious as to what is really going on here and making sure that there are no problems that are just being hidden by this setting.
I set remote.SSH.showLoginTerminal: false in the VS Code settings and it either hides these warnings or it gets rid of them. I am not sure. So, while I don't know why these warnings occurred, or if this setting really "fixed" it, I am going to say this is solved because nothing is blocking my use of the SSH Remote features of VS Code, and I am no longer getting annoying warnings.
The "Extensions want to make changes" part does not seem linked to microsoft/vscode-remote-release, but is more a VSCode warning, as shown in microsoft/vscode issue 108940, still opened in issue 96699.
Closing the install terminal does not terminate the session, but check settings, as seen in the "Troubleshooting hanging or failing connections": something like "remote.SSH.showLoginTerminal" could have bearing on what you see.
The OP Charles Williams confirms having set "remote.SSH.showLoginTerminal" to false, which seems to resolve (or hide?) the issue.
I met the same problem as yours. At last, I found this problem happened because I used both MobaXterm and vscode to connect the remote host at the same time. When I closed MobaXterm ssh connection, the problem in vscode was solved.
Allowing the editor to install random undocumented code onto every remote server you access is very odd.
I've spent a fair amount of time going through the current (Aug 2022) VS Code 3rd-party extensions to find a less-invasive alternative, and the most straightforward seems to be "ftp-simple" which uses the common technique of using (s)ftp as the file-io method to the remote server allowing you to browse the file system, open file, edit, save pretty much as you would do on the local file system.
Some other VS Code 3rd-party (s)ftp extensions use the heavyweight 'synchronize workspace' model where your client copies the entire directory tree below your 'remote folder' assuming it's a 'project', and then keeps that local copy in sync with the server. This works ok for developers working on small projects (although frankly Git would be better) but doesn't fit the sysadmin ad-hoc file edits I might need to do. Another hiccup is some extensions allow you to edit a remote FILE, but don't integrate browsing the remote file system, so you have to specify the complete filename for the file you want to edit.
SFTP is a good fit for remote file editting because the editor file i/o is basically 'browse filesystem', 'read entire file', 'save entire file' which maps to sftp fine, and the clear delineation between the editting and the file read/write makes the remote access less vulnerable to connection issues.
I have my work computer which is a Windows 10 Pro and my laptop is a Windows 10 Home. Working on the same project on both: push and pull to Git. Learning React through Udemy. Both computers using Chrome. Both using Bash on Ubuntu on Windows with latest updates. Both using ConEmu for the console. Both npm -v = 3.10.10. Both node -v = 6.11.2. Hardware is different obviously, but not sure that is relevant and worth listing.
Anyway, this starter project I am playing around with, when I make changes to it and npm start is running, you can see activity in the console, hit refresh in the browser, and any changes made will be reflected.
On the laptop, this process does not work. Make change, save, no activity in console, refresh in browser does not reflect the changes. Have to restart npm start for changes to be reflected. A little irritating to say the least.
Anyway idea what might cause this? Really haven't come across anything in my Googling efforts.
If you are using npm in WSL2.0 for development, please refer the last point in this-
https://create-react-app.dev/docs/troubleshooting/#npm-start-doesnt-detect-changes
While WSL1.0 doesn't use a VM, WSL2.0 does use a lightweight VM, so adding
CHOKIDAR_USEPOLLING=true
in a .env file in the project directory fixed the problem.
On a sidenote, you might wanna take a look at this
Client side
To ensure client side changes aren't being cached, you can open devtools > Network, and check "Disable cache". After enabling this, you won't have anything in the cache as long as devtools is open.
Alternatively, you can use incognito / private browsing mode to prevent the cache from holding on to things.
Server side
I'm sure you've realized that it's a pain to restart your server every time you want to see your code update. There are several tools that will detect file changes and handle restarting the server automatically.
PM2
Nodemon
Forever
I just add file .env and inside FAST_REFRESH=false.
For me, working in Windows, WSL2 caused this not to work. Running npm start in Command Prompt, not WSL solved this issue for me.
Reminder: Arch Linux uses pacman not apt-get
So I had an idea that I wanted to be able to leave my room and still see the progress of a download from my phone. I have looked for preexisting programs but have found none, so I decided to write a program myself.
the first step I took was reading the pacman documentation, to see if a function that could get the current download status was. I know there is a file I can check to see if exists
/var/lib/pacman/db.lck
which would tell me if there is a download
however I wanted to know more specifics on the download - progress and time remaining, name of download.
I have also found some GUI programs that use pacman and I was thinking of getting the source code to see if I could use some of that, but haven't found anything useful.
is there a way to find out the specifics about a current download, other than looking at the terminal that the command is running on?
Why overcomplicate things? Just install "screen" via pacman, and start the pacman update inside a screen.. And from your smartphone, use a SSH client to connect to your local machine and access that screen.
You could setup an ssh server on your host machine and connect to it using a terminal emulator on your phone (termux for example) and run whatever commands you like from there. This way you'll be able to view all terminal output from your phone quite seamlessly.
On our Trac system, two things suddenly stopped working. The first thing is the update of the "Browse Source". The second thing is the auto-fixing feature. The only solution for the first issue is to manually run the post-commit hook of the SVN repository. But than we still have the problem, that Trac doesn't close ticket anymore depending on the SVN commit message. That was working before without any issues. Ah and a third thing is that PNG images are no longer shown in the HTML preview. The user has to download the file to see it.
Is there any known bug or issue for our described problem. Or how can I update the Trac system without loosing all the information within the Trac projects (I have set up a multi project Trac system).
If all else fails, reboot the server :)
Can you give us some more info about your server and Trac setup? For example, OS and version, Trac version, plugins used, etc.
It's odd for things to suddenly quit working. If you are running a Linux system, it's possible that your server installed some updates that your system isn't fully compatible with (for example, upgrading Trac can cause some plugins to quit working properly). Check your server's logs to see if anything was updated or reconfigured around the time Trac quit working.
Also, try setting Trac's log priority to 'DEBUG' and see if the Trac logfile contains any useful error details.
The solution was the following: file permissions!
To solve the issue we used the sudo in the post-commit hooks of SVN like the following:
sudo /usr/local/bin/trac-admin /var/trac/reponame/ changeset added "reponame" $REV
And we had to allow the SVN user to run the trac-admin command using visudo:
www-data,svn ALL=(ALL) NOPASSWD: /usr/local/bin/trac-admin