Closed jotazzu closed 4 years ago
Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/
Varying Vagrant VagrantsJoin the VVV Slack Workspace
You SSH into the machine by running vagrant ssh
, and you can use vagrant ssh-dump
to dump out an SSH config for faster connections with the ssh
command.
As for SFTP, I'm not sure why you would want to SFTP into the VM, any folder of interest is mapped on to the filesystem already, so the best SFTP client for VVV on MacOS is Finder, explorer.exe
etc, /srv/www
and the www
folder in your VVV install are the same folder, they're not duplicates/clones
Hi tomjn thank you for the quick answer. I use the standard ways to access the VM you mention, too. But to keep in my work flow when working with external servers I prefer using a SFTP client and Putty.
The simple reason is that different source code versions are easier distinguishable for me when one is open in Windows Explorer and the other in the SFTP client. This prevents potential mismatches by overwriting the wrong file. Putty can be opened conveniently from my SFTP client with one key shortcode.
The point is that you with VVV on connecting with SFTP will access internally to the VM to put file in a folder that is shared from your host machine, and that file will be written in the host and not inside the machine. It is like do a full trip that is slow instead use the best street that require just one step.
So for VVV is not the right workflow use SFTP when instead you can write to the files that are in the host machine. The real solution is to use an editor that you configure to work on your local instance of VVV with the host machine so you don't need to access the file manager if you are afraid to alter the wrong files. There are a lot of solutions to upload files on the remote server and avoid confusions like https://github.com/welaika/wordmove or automatically pull from git in the machine as example.
GitHubMulti-stage command line deploy/mirroring and task runner for Wordpress - welaika/wordmove
I think we can clarify this better in documentation, I don’t agree with the workflow but if it keeps someone productive we can voice the pros and cons
the SSH credentials are not listed in section '6. Reference: Default Credentials' of the documentation
It would appear that they are listed and have been for 3 years now:
The only part missing is the host to connect to, but I would expect vvv.test
to be the host as that's the location of the dashboard which is hosted on the same machine.
GitHubThe VVV docs and website. Contribute to Varying-Vagrant-Vagrants/varyingvagrantvagrants.org development by creating an account on GitHub.
At first I want to say that VVV is very good stuff as it allows to access the VM easily. Better than XAMP which has no VM or other solutions with VM but limited access to the VM for user friendly handling. I appreciate your extensive work on this project over the last years.
Nevertheless SFTP (from a SFTP client) and SSH (e.g. from PuTTY) do need a password. It is documented in '6. Reference: Using an SQL Client' under 'Using an SSH Tunnel'. SSH host: vvv.test SSH username: vagrant SSH password: vagrant I've just tested this and access is only with password.
And for clarification: I do not copy files from from the Windows www folder to /srv/www using SFTP. The other folder I use is on another place on my local machine (e.g. d:/develop/project/myproject). And I am very well aware that my work flow is not the fastest way to handle file management. But it is still fast enough to suffice my needs. Initially I used two Explorer windows for copying but had sometimes the problem to reassure which Explorer window relates to which file path (e.g. after moving the Explorer windows on the desktop for any reason). Thus I decided to use the SFTP client for the file path also mapped to the VM. And I only need to add an entry in my SFTP client (WinSCP) to have my work flow configured.
But I think more important is the other topic I've mentioned in the initial post. I will try to detail it in the next comment separately.
Some more details about the need of a Git command line program to install VVV succesfully.
During installation of VVV I encountered the same error already reported in issue #1527 by jeanzi: Message: Errno::ENOENT: No such file or directory - git --git-dir="C:/Users/xyzuser/VVV/.git" --work-tree="C:/Users/xyzuser/VVV" rev-parse --abbrev-ref HEAD
I've found the ERROR NO ENTRY relates to the missing git command line program on the local Windows machine. The reason was that I had installed the widely used visual Git interface program SourceTree with the option to use an embedded Git controller. I did not install a separate git command line tool. Thus the call in the VVV script could not find the git command. Installing a Git command line tool solved the problem.
I think it might be helpful for other Windows users who only have installed SourceTree with an embedded controller to mention in the installation requirements that a Git command line tool is needed for successful installation of VVV.
I think it might be helpful for other Windows users who only have installed SourceTree with an embedded controller to mention in the installation requirements that a Git command line tool is needed for successful installation of VVV.
Already done yesterday in:
https://github.com/Varying-Vagrant-Vagrants/varyingvagrantvagrants.org/pull/166
As for SFTP, I configured FileZilla as follows:
The connection was successful, regardless of what the password field was set to, I even set the password in Filezilla to bananas
and it worked.
This is because vagrant boxes don't normally use password-based authentication, but rely on key authentication instead. We don't set the config.ssh.password
value either https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html#config-ssh-password
Vagrant by HashiCorpThe settings within config.ssh relate to configuring how Vagrant will access your machine over SSH. As with most Vagrant settings, the defaults are typically fine, but you can fine tune whatever you would like.
I think it might be helpful for other Windows users who only have installed SourceTree with an embedded controller to mention in the installation requirements that a Git command line tool is needed for successful installation of VVV.
Already done yesterday in: Varying-Vagrant-Vagrants/varyingvagrantvagrants.org#166
Section 'System Requirements' has been well improved.
... This is because vagrant boxes don't normally use password-based authentication, but rely on key authentication instead. We don't set the
config.ssh.password
value either https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html#config-ssh-password ...
Strangely this does not work on my machine. I've tried with WinSCP and also with PuTTY. Using a random password or an empty password does not succeed. Only entering password 'vagrant' gives access. I've upgraded from a 4 years old previous installation. May be there is some old stuff stored.
Vagrant by HashiCorpThe settings within config.ssh relate to configuring how Vagrant will access your machine over SSH. As with most Vagrant settings, the defaults are typically fine, but you can fine tune whatever you would like.
Possibly but 4 years ago we used a different box and distribution of Ubuntu, you would have needed to delete and recreate the VM to successfully upgrade. I would expect if a password was required and you didn’t provide one that it would prompt for one
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
To connect via SFTP or SSH from the local machine to the VM (not using a local console like cmd or Git Bash) the SSH credentials are not listed in section '6. Reference: Default Credentials' of the documentation. I've found them in the '6. Reference: Using an SQL Client'. It might be easier to find them if listed in Default Credentials, too.
Also I encountered a problem during 'vagrant up' on Windows due to using the program SourceTree which offers an embedded Git controller. The display of the VVV splash logo requires a command line installation of Git instead. Perhaps this could be mentioned in '2. Getting Started: Starting VVV' or in 'Software Requirements'. The resulting error message has already been reported in #1527.