nik*_*las 4 git plesk git-submodules
我安装我的Plesk网站所描述的通过后钩自动拉从远程仓库更改Web服务器的某个路径这里。
但是,我的存储库包含一个 git 子模块,我还需要运行自定义命令git submodule update --remote。我怎么能告诉 plesk 这样做。我可以输入的命令
启用其他部署操作
设置似乎没有在正确的路径中执行。此外,当我转到存储库在我的服务器上同步到的路径时,我得到:
fatal: Not a git repository (or any of the parent directories): .git
我怎样才能告诉 plesk 也使用 git 插件更新子模块?
就我而言,这是两个问题。这是一个子域的设置,其中的文件夹结构在 plesk 中是不同的。
首先,我必须将“附加部署操作”设置为
# find the correct git folders / repositorys by ssh-ing onto your server
git --git-dir=/var/www/vhosts/example.com/git/example.git --work-tree=/var/www/vhosts/example.com/subdomain.example.com/path/to/working-directory/ submodule update --init --recursive
Run Code Online (Sandbox Code Playgroud)
第二个问题是子模块放在github上,所以我只好在github上添加了具体的子域ssh-key。它可以在。
/var/www/vhosts/example.com/.ssh/id_rsa.pub
Run Code Online (Sandbox Code Playgroud)
即使是子域。希望能帮助别人。
| 归档时间: |
|
| 查看次数: |
788 次 |
| 最近记录: |