我在CentOS 5.9服务器上安装gitolite.我创建了git用户,然后在su - git设法将我的公钥放入〜/ .ssh /目录后,我已成功克隆了github上的gitolite repo并运行了gitolite/install -ln.下一步是运行gitolite设置.
git@hostname [~]# gitolite setup -pk $HOME/.ssh/micha.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
FATAL: fingerprinting failed for '/tmp/Q3pnE4WVbu'
Run Code Online (Sandbox Code Playgroud)
谷歌搜索和SO搜索没有帮助我解决这个FATAL错误,我现在陷入困境.
我应该在运行安装程序之前自定义gitolite.conf文件吗?我一直在按照http://gitolite.com/gitolite/progit.html的说明进行操作,因为对于像我这样的noob来说,比起普通的gitolite文档更容易理解.但是,这些说明没有提到自定义.conf文件.
更新: 我尝试生成一个新密钥,它仍然失败:
git@hostname [~]# ssh-keygen -t rsa -C "Gitolite Admin Access (not interactive)" -P ""
Generating public/private rsa key pair.
Enter file in which to save the key (/home/git/.ssh/id_rsa): /home/git/.ssh/micha
/home/git/.ssh/micha already exists.
Overwrite (y/n)? y
Your identification has …Run Code Online (Sandbox Code Playgroud) 我根据需要创建了一个别名来跟踪我的跟踪分支。这[alias]是我的 .gitconfig 部分的当前行:
catchup = !CURRENTBRANCH=$(git symbolic-ref --short HEAD) && echo Currently on $CURRENTBRANCH - switching to $1 && git checkout $1 && git merge origin/$1 && echo Going back to $CURRENTBRANCH && git checkout "$CURRENTBRANCH"
Run Code Online (Sandbox Code Playgroud)
我按如下方式使用它(例如):
git catchup new_design
Run Code Online (Sandbox Code Playgroud)
此代码导致(例如):
Currently on integration
Switched to branch 'new_design'
Your branch is behind 'origin/new_design' by 1 commit, and can be fast-forwarded.
Updating c82f7db..51eea8a
Fast-forward
themes/theme1/css/styles.less | 17 +++++++++++++++++
themes/theme1/js/app.js | 6 +++---
2 files changed, 20 insertions(+), 3 deletions(-) …Run Code Online (Sandbox Code Playgroud) 我在int-array类型的字段中遇到此问题.使用aws-sdk for Node.js,我通过CloudSearchDomain.uploadDocuments()方法提交文档.文档的JSON(在searchContent变量中)是在节点进程中创建的,然后我使用:
var params = {
contentType: 'application/json',
documents: JSON.stringify([searchContent])
};
csd.uploadDocuments(params, function(err, data){
...(callback process)...
});
Run Code Online (Sandbox Code Playgroud)
非字符串化的searchContent对象如下所示:
{ id: 1,
type: 'Product',
hash_type_id: 'Product-1',
name: 'Test product',
description: 'A test product',
category: [ 2 ],
content: '<some text here>',
state: [ 1 ],
hash_all: '<some text>'
}
Run Code Online (Sandbox Code Playgroud)
和字符串化如下:
[{"id":1,"type":"Product","hash_type_id":"Product-1","name":"Test product","description":"A test product","content":" <some text>","category":[2],"state":[1],"hash_all":"<some text>"}]
Run Code Online (Sandbox Code Playgroud)
我得到的错误是:
{
"message": "{ [\"The value of category cannot be a JSON array or object\"] }",
"code": …Run Code Online (Sandbox Code Playgroud) 我正在尝试在表中创建记录,它与其他现有模型共享一些属性.
// model:
module.exports = {
attributes: {
...
contentType: 'string', // This is a combination foreign-key,
// which is not currently
content: 'number', // supported in waterline
...
}
}
// creating code:
sails.log('item.content:', typeof item.content, item.content);
UserContentLibrary.create({
user: prodSubscription.user,
productContentSubscription: pcs.id,
contentType: item.contentType,
content: item.content,
}, function uclCreateCB(err, ucl){
if (err){
sails.log.error(err);
}
itemDone();
});
// error (console output):
debug: item.content: number 3
error: Error (E_VALIDATION) :: 1 attribute is invalid
...
Invalid attributes sent to UserContentLibrary:
content …Run Code Online (Sandbox Code Playgroud)