Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/shell/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash Vagrant:如何从私有存储库运行Vagrant文件中的配置脚本?_Bash_Shell_Github_Vagrant_Vagrantfile - Fatal编程技术网

Bash Vagrant:如何从私有存储库运行Vagrant文件中的配置脚本?

Bash Vagrant:如何从私有存储库运行Vagrant文件中的配置脚本?,bash,shell,github,vagrant,vagrantfile,Bash,Shell,Github,Vagrant,Vagrantfile,我在Github上有一个私有存储库,它包含一个脚本,我想用它来提供免费服务。因为我的存储库是私有的,所以我需要授予对脚本的访问权。请告诉我怎么做 我试图使用链接中的令牌授予访问权限,但这会导致以下错误: C:/Program Files (x86)/Vagrant/embedded/mingw64/lib/ruby/2.4.0/tempfile.rb:133:in `initialize': Invalid argument @ rb_sysopen - C:/Users/Stas/AppDat

我在Github上有一个私有存储库,它包含一个脚本,我想用它来提供免费服务。因为我的存储库是私有的,所以我需要授予对脚本的访问权。请告诉我怎么做

我试图使用链接中的令牌授予访问权限,但这会导致以下错误:

C:/Program Files (x86)/Vagrant/embedded/mingw64/lib/ruby/2.4.0/tempfile.rb:133:in `initialize': Invalid argument @ rb_sysopen - C:/Users/Stas/AppData/Local/Temp/vagrant-shell20181004-3104-19o2zkk.sh?token=blah-blah-blah-blah-blah-blah (Errno::EINVAL)
    from C:/Program Files (x86)/Vagrant/embedded/mingw64/lib/ruby/2.4.0/tempfile.rb:133:in `open'
    from C:/Program Files (x86)/Vagrant/embedded/mingw64/lib/ruby/2.4.0/tempfile.rb:133:in `block in initialize'
    ...
显然,流浪汉无法修剪GET参数和文件名

我的系统:Windows。
我知道,但我需要另一个解决方案。

首选解决方案是使用SSH代理转发链接到的解决方案。我们用它来处理流浪汉,效果很好

作为一种替代方法,您可以使用为您的私有存储库提供无限制的只读访问权限。您可以将未加密的私钥放在Vagrant目录中,这样它就会出现在/Vagrant中。然后,在配置脚本中,将其安装为/root/.ssh/id\u rsa。请记住设置/root/.ssh和/root/.ssh/id_rsa组的权限,以便其他组无法访问它们。之后,git克隆应该可以工作了

我要指出的是,使用未加密的私钥是不好的做法,尽管部署密钥有时不可避免。请特别注意确保从未将未加密的私钥推送到GitHub