I keep getting a "Host Key Verification Failed" error when trying to push changes to a git controlled folder/project to Gitlab. For whatever reason, it works fine using Visual Studio for Mac, and I can login to my Gitlab account just fine via web browser.
Resolved by deleting any/all Known_hosts files in ~/.ssh/ and then executing ssh git#gitlab.com in Terminal and answering "yes" (which re-adds git#gitlab.com to known_hosts after re-creating a new known_hosts file).
I did some messing around in known_hosts which probably caused the problem.
I found that my home profile was loading as "P:\" in git bash (because of my work's IT team...).
Ensure that in git bash you have generated an ssh key using ssh-keygen and that GitLab knows about the key.
If you still have the issue, run ssh -o StrictHostKeyChecking=no <gitlab-host> uptime to make gitlab trusted.
I re-created ssh keys in git for Windows and it worked!
In Windows, I was receiving this error from Git on MS Visual Studio Code.
I had to launch it from Git Bash to pull in my git and ssh environment configuration.
<your git bash prompt> $ Code
VS Code should Launch, and you should be able to clone a repo via ssh then.
The problem is with known_hosts file only. I already had an entry for the remote server in this file. After deleting existing entry for the remote server I was able to follow the steps to login to remote server and then add a new entry for same in known_hosts file.
Related
I use VSCode with a remote SSH connection to modify my application code.
Before I start VSCode, I perform an ssh-add of my GitHub ssh key.
One of my VSCode remote workspaces is stuck in a state in which my github ssh key is not accessible.
Here is a sequence of steps that I have performed to troubleshoot this issue.
From my desktop, run ssh-add -l. My github ssh key is available.
Open VSCode terminal. Run ssh-add -l. My github ssh key is available.
Connect to a remote host in VSCode. Open terminal. Run ssh-add -l. My github ssh key is available.
Connect to the same remote host. Open project folder X. Open terminal. Run ssh-add -l. My github ssh key is not available.
What can I do to reset/refresh my VSCode workspace for project folder X?
I have tried the following steps
Run "Developer: Reload Window" in VSCode. Repeat the steps above. Same results.
Quit VSCode. Repeat the steps above. Same results.
Log out of my desktop. Repeat the steps above. Same results.
The message keeps saying uploading files "forever". What I did was created a folder with a file inside. On Github, the repository was created successfully but the file is not uploading. And yes I have installed git.
The repository created successfully but the files are not uploading.
If you have the latest Git for Windows, chances are you have a git config credential.helper set to manager-core.
As I mentioned in "After $git push -u origin main command, Git bash is not requesting any authentication literally does nothing", the same issue is seen in command-line, not just VSCode.
This is because of the Git-Credential-Manager-Core (interface to the Windows Credential Manager, in charge of caching your credentials: GitHub username/token).
Try and install the last GCM-Core (released yesterday), and see if the issue persists then.
Or, alternatively, you could use an SSH URL, again, to see if the issue persists.
What fixed it for me:
In VSCode: File -> Preferences -> Settings.
Filter for "git".
Select "git (80)" on the left pane.
Uncheck this:
Git: Require Git User Config
Controls whether to require explicit Git user configuration or allow Git to guess if missing
I have a project written in Python, hosted on Heroku, and which I've been working on in Eclipse/PyDev.
I can commit fine from inside Eclipse, and I can git push heroku master from the command line, but it would be much smoother if I could push a branch directly from Eclipse.
The problem is I'm getting the username and password login prompt in Eclipse for my heroku remote.
Is there any way to set this up to use my SSH key from Eclipse?
Is there any way to set this up to use my SSH key from Eclipse?
Set the ssh keys on your machine and then change the url of the cloned repository to the ssh protocol 'git#....`
Once your keys are set correctly you should not see the username password again.
P.S
Once you set your keys and you have updated the repository url do a first time fetch/pull so your key will be added to the known_hosts file. (answer yes when prompt)
I am using Windows 7 / Eclipse Juno / Git Extension 2.43
I have set up a VM Server with UbuntuS Server & Gitolite and added a repo.
Afterwards i cloned the repo with Git Extensions. Everything fine so far. I was also able to conect with Egit via Eclipse. Both using the ssh key.
But now i have the problem that after a restart Eclipse does not connect to the repo.
When i try with Git Extension everything works as it should. The curious thing is that after the successful connection with Git Extensions Eclipse is also able to connect.
After the next restart same problem.
Also to mention is that Eclipse never asks for the passphrase of the ssh key but Git Extensions does.
Maybe Git Extensions somehow caches the passphrase for the key?
I could always start Git Extension after every reboot but thats not really what i want to do.
Any idea?
Thx in advance!
I just started a new job, which is trying to start using Git for version control. I am trying to help them with the process but it is turning out to be more complicated than anticipated.
Currently, all new files are uploaded to the dev server via SSH FTP as follows:
SSH into first machine, then SSH from here into the actual Dev server.
Ideally, we'd like to be able to be able to enter "git push dev" and have git skip through both SSH to push the files to the Dev server... However, I'm not sure how to add a sequence of origins to Git...
Does anyone know if this is possible, or how one might go about doing this?
Thanks in advance.