-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VAGRANT_HOME special characters don't work #2113
Comments
Yes I would consider this a bug as well. Thanks! |
What shell are you running this in? |
I did it in Command Prompt. |
I actually can't reproduce this. It worked fine in my installation of Vagrant 1.3 on Windows. :( Any thoughts? |
Actually, I saw this issue on a coworker's machine. Let me create another user with the same special char on my own machine and try to reproduce the error. I will post the debug output as soon as I can. |
OK, reproduced that. I created an user "Berté" and tried to start a Vagrant instance with a common Vagrantfile. The output of
Then I enabled VAGRANT_LOG to get more information about the error. Here's the output:
Since I setted VAGRANT_HOME to "C:\Windows\Temp" and everything worked fine, my guess is that the error is exactly in the line below, specifically in the Bert\x82 thing:
Can you recreate the same scenario now? |
What about this problem? |
I have exactly same problem because I have not english user name in windows:
After changing VAGRANT_HOME to normal english path all works good. |
Same here. |
+1 |
1 similar comment
+1 |
Here's another issue I ran into I think for the same reason :
I had put my vagrant box directory inside Since I spent some time tracking this down without finding any workaround on google I thought I might post this here for referencing purpose. |
+1 |
I'm not sure if both problems are related, but I can't put special chars in the @mitchellh Should I open another issue or keep it in this one? |
This remains an issue with Vagrant 1.6.2:
|
The problem with the username can be solved by the following fix: diff --git a/lib/vagrant/util/platform.rb b/lib/vagrant/util/platform.rb
index 6e51667..d0262e4 100644
--- a/lib/vagrant/util/platform.rb
+++ b/lib/vagrant/util/platform.rb
@@ -121,7 +121,7 @@ module Vagrant
# Traverse each part and join it into the resulting path
original.each do |single|
Dir.entries(path).each do |entry|
- if entry.downcase == single.downcase
+ if entry.encode('UTF-8').downcase == single.encode('UTF-8').downcase
path = path.join(entry)
end
end Vagrant completes initialization after that. However, another problem appears:
|
Please notice that the same is true for the hostname.
|
I saw this for the first time on a Mac today. My username has no "funny" characters, and the VM's hostname is something like
|
I was talking about the hosts hostname, have you checked out that one as well? |
@KaiWeing ah ok. Well it's the default assigned at first use: |
May be relevant: Ruby, the Web, more of the world now uses UTF-8 by default. Windows uses UTF-16. |
Just a small workaround to fix this: |
I manged to skip that error with setting env var: VAGRANT_HOME to path with only ASCII chars. But fixing that will be great thing. |
please fix this. :( |
This is what I get, every time I use vagrant:
I had similar problem with capistrano, but it was solved when I've updated Ruby from 2.0 to 2.1. |
I'm ~80% certain that upgrading the Vagrant installer to Ruby 2.1 will fix this issue. Ruby core has spent a lot of time fixing all the encoding issues. |
@sethvargo At least the issue with special chars in |
Same issue here on Win 7. I have an "é" in my username and I'm getting the encoding error. Creating and using another user just for the vm would be a hassle. Any workarounds for this? |
workaround: set VAGRANT_HOME to another directory. I set mine to c:\vagrant |
Even if Ruby fixes the issue, the underlying provider (vmware, vbox) likely won't support it 😦 |
@luisrudge Thank you Luis, that did the trick. Just a heads up for those that want to use this fix, Luis's solution is limited to the current session so remember to put that line in your bash profile. |
I'm on Windows and I set globally to that directory, so it's always working! |
Just to confirm, setting VAGRANT_HOME and GEM_HOME to a ASCII only path will fix this issue without any other (at least not detected) problems. in windows you can do on a elevated cmd prompt (run as admin): I know this won't fix the issue, but might help others who come here searching for a sollution or quick fix :) |
I got a similar error when using rsync, it appears that the problem did not comme from vagrant but rather from different locale between host and vm. After setting the same locale on my vm as my host i don't have this problem anymore. |
Ohai everyone! Given the nature of this (and related issues), I have created #4966. Please add your thoughts and ideas there. While it is feasible for Vagrant to fix these types of encoding issues, there are known issues with the underlying providers (VirtualBox, etc) that are likely to be affected. As such, I think the best pathway forward is for Vagrant to expose a warning message to users when their path contains "invalid" characters so it is obvious to the user the issue at hand. |
+1 |
+1
|
For me the following worked: 1.) Go to c:\Users |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
After some hours, I figured out that Vagrant can't unpackage boxes to VAGRANT_HOME when Windows (7) username has special characters like "é". Debugging, I've seen that if username is Pelé, for example, Vagrant attempts move the file to something like C:/Users/Pel\0xE9/.vagrant.d/tmp, causing a "failed writing body" error.
I know that a username like that is weird and I still can set another value to VAGRANT_HOME, but seems like a little bug to me.
The text was updated successfully, but these errors were encountered: