我已经在虚拟机上运行了gitlabhq rails服务器,按照本教程https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md的 1-6步执行并启动rails server execution 命令sudo -u git -H bundle exec rails s -e production
.之后我创建了用户,使用管理工具并在此用户下创建了新项目.然后我一直试图将现有项目推送到这个仓库.但在最后一步,git push origin master
失败了错误
[远程拒绝]主 - >主(预接收挂钩拒绝)
附加信息:
1)我没有通过电子邮件激活链接激活用户(项目所有者),因为我没有在服务器端配置后期服务,我在本手册中没有找到如何操作的说明.
2)Gitlab服务器生成如何将项目推送到repo并且没有repositories/
路径的提示.我的意思是它生成git@mygitlabhost:user/repo.git
而不是git@mygitlabhost:repositories/user/repo.git
正确的.
3)当我试图调试它,我打开pre-receive
里面回购脚本在服务器上,并试图输出变量(有其中3) refs = ARGF.read
,key_id = ENV['GL_ID']
并repo_path = Dir.pwd
发现,该KEY_ID总是空的.也许问题就在这里......如果是这样,请给我一些如何解决这个问题的建议.谢谢
我正在编写Logger并且遇到了自动添加类名的问题,我从中调用了print_log方法.例如这样的事情:
class Logger
def self.print_log(string)
puts Time.now.strftime('%T | ') + *caller_class_name_here* + ' - ' + string
end
end
class MyClass
def initialize
Logger.print_log 'called .new() method'
end
end
Run Code Online (Sandbox Code Playgroud)
作为调用MyClass.new
方法的结果我想在输出中看到:
14:41:23 | MyClass - 调用.new()方法
我确信它可以使用caller
,但却找不到
我需要在文件中写入所有utf-8字符.我将所有代码都作为字符串"5363"或"328E",但我无法将其添加到\ u,以构建结构,如"\ u5363".请帮帮我.
我需要通过电子邮件搜索联系人。根据ES 文档,实现这一目标的最佳方法是使用分uax_url_email
词器。这是我的索引设置:
settings: {
index: {
creation_date: "1467895098804",
analysis: {
analyzer: {
email: {
type: "custom",
tokenizer: "uax_url_email"
}
}
},
number_of_shards: "5",
number_of_replicas: "1",
uuid: "wL0P6OIaQqqYpFDvIHArTw",
version: {
created: "2030399"
}
}
}
Run Code Online (Sandbox Code Playgroud)
和映射:
contact: {
dynamic: "false",
properties: {
contact_status: {
type: "string"
},
created_at: {
type: "date",
format: "strict_date_optional_time||epoch_millis"
},
email: {
type: "string"
},
id: {
type: "long"
},
mailing_ids: {
type: "long"
},
subscription_status: {
type: "string"
},
type_ids: {
type: …
Run Code Online (Sandbox Code Playgroud)