在重新安装Windows 10之前,我使用了使用SMB同步类型的Vagrant盒子(ubuntu / xenial64)。现在,我以同样的方式(安装Virtual Box + Vagrant,两个最新版本),我更改了配置以使用SMB并设置mount_options。这是config。
我从cmd作为管理员运行(Powershell和简单的cmd,尝试过两者)Intent launchIntent = new Intent(Intent.ACTION_MAIN);
launchIntent.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName cn = new ComponentName("com.domain.anotherapp",
"com.domain.anotherapp.widget.WidgetProvider");
launchIntent.setComponent(cn);
startActivity(launchIntent);
,但 vagrant 仍然问我用户名和密码。那么,如何设置默认用户名和密码?在它适用于我之前。用户名和密码是正确的,因为当我在控制台中输入时,其接受的成功和文件夹安装良好。
Windows 10 Pro x64 1703
Vagrant 1.9.5
VirtualBox 5.1.22
Box:ubuntu / xenial64
由于
答案 0 :(得分:6)
您可以指定smb_password
和config.vm.synced_folder "./www", "/var/www", type: "smb",
smb_password: "mypass", smb_username: "mymail@live.ru",
mount_options: ["username=mymail@live.ru","password=mypass"]
(请参阅https://www.vagrantup.com/docs/synced-folders/smb.html#smb_username)
import io.vertx.rxjava.core.buffer.Buffer;
import io.vertx.rxjava.ext.web.client.HttpResponse;
import rx.Single;
public Single<HttpResponse<Buffer>> getLanguages() {
WebClientOptions options = new WebClientOptions().setUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.82 Safari/537.36");
WebClient client = WebClient.create(Vertx.vertx(), options);
Single<HttpResponse<Buffer>> single = client
.get("time.jsontest.com", "/")
.rxSend();
return single;
}