我正在编写一个可用于未来项目的框架。我想将框架放到一个私人托管的git服务器上,并在以后的项目中用composer加载它。
我可以在进行git init时知道使用“ --bare”吗?我曾经创建过“裸露”的仓库,但作曲家说找不到这个包。我到处搜索,并认为这是由于“缺少composer.json”造成的。但是,如果没有“ --bare”,我什至无法将代码推送到服务器。我将框架“ git clone”到另一个位置,并使用composer加载该位置,仍然失败。
我已经尝试了以下两个版本,但都失败了:
"repositories": [
{
"type": "vcs",
"url": "https://server/git/sdk/"
}
]
"repositories": [
{
"type": "package",
"package": {
"name": "vendor/sdk",
"version": "master",
"source": {
"url": "https://server/git/sdk/",
"type": "git",
"reference": "master"
}
}
}
]
Run Code Online (Sandbox Code Playgroud)
谢谢。
我已经使用 Ubuntu 17.10 在我的 PC 上测试了代码。Chrome 与 UI 一起启动,所以一切正常。
Vultr 实例安装了 Ubuntu 16.04、Python 3、Selenium、Google-Chrome、Chromedriver 和 xvfb。默认用户是 root。
chromedriver-2.33.506092 位于 /usr/bin/chromedriver,而 Google-Chrome-62.0.3202.75 位于 /usr/bin/google-chrome
但是,在 Vultr 实例上运行它会出现以下错误:https ://pastebin.com/RJX6Ynxe
下面是部分代码。
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.ui import Select
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1024, 768))
display.start()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
self.driver = webdriver.Chrome(chrome_options=chrome_options)
Run Code Online (Sandbox Code Playgroud)
这是服务日志:https : //pastebin.com/s6Nw3Jxc
有谁知道如何解决这个问题?
谢谢!