我试过按照这些说明操作:https://stackoverflow.com/a/40312117/21728基本上这样做:
sudo apt-get install libsecret-1-0 libsecret-1-dev
cd /usr/share/doc/git/contrib/credential/libsecret
sudo make
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
Run Code Online (Sandbox Code Playgroud)
但是当我进行任何网络操作时,我收到此错误:
** (process:7902): CRITICAL **: could not connect to Secret Service: Cannot autolaunch D-Bus without X11 $DISPLAY
Run Code Online (Sandbox Code Playgroud)
这是合乎逻辑的,因为确实没有X11显示器.
如何在Windows(WSL)上的Ubuntu上使Git凭据缓存工作?
我正在寻找一种方法来安全地存储凭证,同时连接到使用SSL的Git服务器.我在@james-ward中遇到了这个建议(我编辑的只是我更新了我们的"系统"配置,而不是Git的"全局"配置(/sf/answers/1016985231/)
sudo apt-get install libgnome-keyring-dev
cd /usr/share/doc/git/contrib/credential/gnome-keyring
sudo make
git config --system credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
Run Code Online (Sandbox Code Playgroud)
然后我就可以跑了
git clone https://ipaddress/git/repo.git
Run Code Online (Sandbox Code Playgroud)
并且凭证助手将存储我的凭据,但是当我运行以下内容时:
sudo git clone https://ipaddress/git/repo.git testfolder
Run Code Online (Sandbox Code Playgroud)
它给我以下错误
** (process:3713): CRITICAL **: Error communicating with gnome-keyring-daemon
Run Code Online (Sandbox Code Playgroud)
我有时需要运行sudo git clone,因为有时我需要创建克隆的目录需要它.任何帮助,将不胜感激.
我正在使用的版本: - git版本1.9.1 - Ubuntu Server 14.0.4
先感谢您!-Richard O.
刚刚遇到这个 Git 行为,它看起来像是凭证存储的错误:
$ git pull
Username for 'https://github.com': ...
Password for 'https://...@github.com': ...
Already up-to-date.
$ git config credential.helper store
$ git pull
remote: Repository not found.
然后,去编辑 .git/config 以删除[credential] helper = store和 git pull 再次工作。
什么可能导致它?
如何在不遇到此错误的情况下使用凭证助手?
更新在 Ubuntu 14.04 上使用 git 版本 1.9.1
更新使用 git 版本 2.9.3 重新测试,结果相同。
更新我在 github 上的 ~/.git-credentials 中有几个帐户。我用 GIT_CURL_VERBOSE=1 GIT_TRACE=1 运行 git,它看起来像是按照它们列出的顺序选择第一个 github 帐户。
但是,我正在使用的存储库中的 .git/config 具有正确的 user.email,它在 ~/.git-credentials 中有一个匹配的条目。它只是不使用该条目。
我决定在gitlab上尝试git lfs.我注意到它不适用于ssh所以我决定使用https.Push工作正常,但当我尝试克隆我的项目时,它要求我输入每个文件的用户名和密码.
那有点烦人.它有什么解决方法吗?
这个问题持续存在,真正的解决方案在哪里?它有简单直接的配方吗?
链接https://git-scm.com/docs/gitcredentials和git-lfs/wiki/Tutorial可能有些东西,但没有客观解决方案.
我描述的情况git lfs env,
git-lfs/2.4.0 (GitHub; linux amd64; go 1.8.3)
git version 2.7.4
LocalWorkingDir=
LocalGitDir=
LocalGitStorageDir=
LocalMediaDir=lfs/objects
LocalReferenceDir=
TempDir=lfs/tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic
UploadTransfers=basic
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
Run Code Online (Sandbox Code Playgroud)
当我做git clone https://github.com/myPrivate/project1 问题克隆过程不完整(错误),并一直在 给用户和密码 ...
尝试做凭证时也出现问题(参见 …
我刚刚在bitbucket上创建了git repo.然后我按照以下方式创建ssh密钥:
1. ssh-keygen -t rsa -C 'dien.vo@asnet.com.vn'
2. ssh-keygen (press enter more)
3. cat ~/.ssh/id_rsa.pub --> it return for me a SSH key
4. Coppy that and added on bitbucket, then I save the new SSH key
Run Code Online (Sandbox Code Playgroud)
之后我选择了SSH链接git git@bitbucket.org:DienVo/abc.git,但是在终端中显示了这一点
sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我不知道我错在哪里,请帮我解决.