问题:
当我在 GitLab 中创建存储库时,由于某种原因,它显示存储库的不同 HTTP URL 和 SSH URL。
例如)
HTTP:http://anotherexample.com/myrepo.git
SSH:git@gitlab.example.com/myrepo.git
我的 gitlab URL 是:https://gitlab.example.com,所以 SSH 是正确的,HTTP 是错误的。
(anotherexample.com是我设置 DNS 之前我的服务器的 URL。)
我查看了 /var/opt/gitlab/gitlab-rails/etc/gitlab.yml,然后发现:
# 1. GitLab app settings
# ==========================
host: anotherexample.com
port: 80
https: false
ssh_host: gitlab.example.com
Run Code Online (Sandbox Code Playgroud)
然后我手动换了这个主机,暂时解决了。
但是,当我执行gitlab-ctl reconfigure时,gitlab.yml将被更新。
问题:
如何在/etc/gitlab/gitlab.rb 中
为 HTTP 设置此主机名?
我已经有以下两行:
external_url 'https://gitlab.example.com'
gitlab_rails['gitlab_ssh_host'] = 'gitlab.example.com'
Run Code Online (Sandbox Code Playgroud)
但它似乎不适用于 HTTP url。
我的 GitLab 版本:8.8.3
我的服务器:CentOS 6.8 + nginx 1.10.1 …
有什么办法可以在two.js中解释带有对象标签的外部svg文件吗?我尝试了下面的方法,但是..
HTML
<object type="image/svg+xml" data="./svg/mydrawing.svg" id="mysvg"></object>
Run Code Online (Sandbox Code Playgroud)
JS
var mySvg = document.getElementById("mysvg").contentDocument;
var shape = two.interpret(mySvg);
console.log(shape);
//in console:
Uncaught TypeError: Cannot call method 'toLowerCase' of undefined
Run Code Online (Sandbox Code Playgroud)
如果我可以导入外部 .svg 文件就好了,因为我的 svg 文件太大而无法在 HTML 中编写为内联 SVG。
提前致谢。