相关疑难解决方法(0)

未知选项`allow-unrelated-histories'

我有两个回购:市场和Android.当我将Android合并到Market时,请使用以下步骤:

cd market
git remote add android ../android
git fetch android
git merge --allow-unrelated-histories android/master
Run Code Online (Sandbox Code Playgroud)

但我得到这个错误:

ei @ localhost:〜/ market $ git merge --allow-unrelated-histories android/master error:unknown option`allow-unrelated-histories'

我的环境:Ubuntu LTS 14.04

ei@localhost:~/market$ git --version
git version 1.9.1
Run Code Online (Sandbox Code Playgroud)

这个选项是从Git合并中删除的,还是需要一些额外的配置?

任何帮助将不胜感激,谢谢!

git version-control android branch git-merge

7
推荐指数
1
解决办法
7191
查看次数

如何安全保存git凭据?

我最近一直在寻找有关如何在CentOS 7中安全保存git凭证的解决方案。

我想保存多个git存储库的凭据。

我想出的解决方案是对任何版本的git 使用gnome-keyring。但是我遇到了一些问题。我发现很多帖子说这不是Redhat 7Centos 7的好解决方案。并且它将被弃用。

git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyrin  
Run Code Online (Sandbox Code Playgroud)

但这对我不起作用,使用git时出错:

与gnome-keyring-daemon通信时出错

然后我升级了git的最新版本2.11+以使用libsecret,这似乎更易于使用。

我做过同样的事情。

git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Run Code Online (Sandbox Code Playgroud)

这似乎按预期工作。我的问题是,这是安全保存git凭据的好方法吗?您是否知道将CentOS凭证保存在CentOS计算机上的其他解决方案?

git credentials

5
推荐指数
1
解决办法
2690
查看次数

为什么 LFS git 的 git Push 询问密码 3 次?

我在 LFS 模式下使用标准 github.com 存储库,并且工作正常...但总是,当我推送时,会发生此 3xLogin:

git push
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 
Locking support detected on remote "origin". Consider enabling it with:
  $ git config 'lfs.https://github.com/xpto-org/xpto-prj.git/info/lfs.locksverify' true
Username for 'https://github.com': xpto
Password for 'https://xpto@github.com': 

Git LFS: (0 of 1 files) 3.38 MB / 925.18 MB 
Run Code Online (Sandbox Code Playgroud)

git large-files

5
推荐指数
1
解决办法
2317
查看次数

一般“未找到 git-credential-libsecret”错误

git repo 没有启用 LFS,但我准备在另一个克隆中使用 git,因此使用git config --global credential.helper似乎是问题的原因。

这里似乎有同样的问题,但我使用的是更新版git(v2.17.0),所以这不是版本问题。

示例:简单之后的git pull消息是

/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 1: 
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 
 /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret: 
 not found
Run Code Online (Sandbox Code Playgroud)

笔记

没有git-credential-libsecret文件,

sudo ls /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
ls: cannot access '/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret': No such file or directory
Run Code Online (Sandbox Code Playgroud)

git credentials

3
推荐指数
1
解决办法
5801
查看次数