我git用于各种项目的版本控制。
是否有用于浏览项目的提交和分支以及在 git 项目中检索版本的 GUI 软件?
在 git 存储库中工作时,我正在使用本指南在 gnome 终端(Ubuntu 15.10)中显示分支名称。基于以上内容,我现在在 ~/.bashrc 文件中有以下内容:
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes
Run Code Online (Sandbox Code Playgroud)
...
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes …Run Code Online (Sandbox Code Playgroud) 使用 GIT 时,我在通过 SSH 使用 GIT 时遇到问题,并且由于它在工作中和在家中使用不同的调制解调器都可以正常工作,因此显然是我的家用调制解调器起作用了。我通过 HTTP 连接没有问题。
所以,我假设这是一个 SSH 问题,但我不是直接使用它的专家。是否有任何我可以运行的命令来设置“测试”连接,并让我确切地知道问题发生的时间和地点?
几乎所有的“大”命令(如fetch,clone或push有多少数据)从git(即使与运行-v),只是在没有指示远程连接中间的“挂起”,为什么他们已经停止,所以他们是没有用的.
有什么方法可以获得有关 SSH 连接中发生的情况的更多详细信息?
当我在git clone git@...每台计算机上运行一次(使用 ssh)重新启动时,会出现一个窗口对话框,其中包含一个用于插入我的 SSH 密码的文本框,并按 OK 确认。然后在我的系统下次启动之前不再需要密码短语。
升级到 Ubuntu 13.10 后,该窗口不再出现,但终端中会出现一条消息:
Enter passphrase for key '/home/username/.ssh/id_rsa':
Run Code Online (Sandbox Code Playgroud)
...每次克隆 git 存储库时都会出现这种情况。
我怎样才能解决这个问题?我只想输入我的密码一次。
我读到了 Git 中的一个安全漏洞,该漏洞已在 2.2.1 版中修复。我目前在我的系统(Ubuntu 14.10)上安装了 Git 2.1.0,并尝试使用 apt 重新安装它。但是,apt 告诉我,我目前拥有最新版本。
Git 网站没有针对 Linux 的预构建版本。他们说你可以用包管理器安装它。如果不从源代码构建,我将如何安装最新版本的 Git?
以下命令:
$git config --global --list
Run Code Online (Sandbox Code Playgroud)
给我:
user.name=test user
user.name=gotqn
Run Code Online (Sandbox Code Playgroud)
我想删除名字。我参考了这篇文章,做了以下命令,但没有任何结果:
git config --global --remove-section user.name='test user'
git config --global --remove-section user.name="test user"
git config --global --remove-section user.name=test user
git config --global --remove-section user.name
git config --global --remove-section test user
Run Code Online (Sandbox Code Playgroud)
我正在使用 Ubuntu 12.04 和
git version
Run Code Online (Sandbox Code Playgroud)
给我
git version 1.7.9.5
Run Code Online (Sandbox Code Playgroud)
请对此提供帮助,因为我想尝试使用 git 保存我的项目,但不想使用“测试用户”名称执行命令。
当我尝试使用 连接到任何 HTTPS 服务器时git,出现以下错误:
error: gnutls_handshake() failed: A TLS packet with unexpected length was received. while accessing ...
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
我想可能是一些相关的包gnutls_handshake被破坏了。所以,我想重新安装那些。
哪些包可能与这些错误有关?或者我该如何解决这种错误?
我正在运行 Ubuntu 18.04,作为 Windows 的子系统。我在多台 PC 上做过这个,从来没有遇到过这个问题。我试着去git clone <repo>,我得到了这个:
Cloning into '<repo>'...
error: chmod on /mnt/c/Users/Efsta/Code/<repo>/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
Run Code Online (Sandbox Code Playgroud)
我尝试了以下方法:
? git config core.fileMode false,这个结果
fatal: not in a git directory
? git config --global core.filemode false
? git config --add --global core.filemode false
似乎没有任何效果。我已经在这里尝试了几个答案,但 WSL 似乎有点棘手。任何人都知道如何解决这个问题?
我也尝试了这个问题中的所有内容:https : //stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-file-mode-chmod-changes,似乎没有任何效果。
除了 Ubuntu / Git 之外,是否有任何与 TortoiseSVN 等效的东西?我想将 Git 命令集成到 Nautilus。
目前,每当我git pull或git push访问 http(s) 存储库时,我都会得到以下信息:
$ git pull
Username for 'https://gitrepos.reposdomain.com': me@mydomain.com
Password for 'https://me@mydomain.com@gitrepos.reposdomain.com':
Run Code Online (Sandbox Code Playgroud)
这对于不经常使用是可以的,但很快就会变得非常烦人。 不幸的是,在这种情况下不能切换到 ssh。
我读过早期版本git提供了凭证“存储”和“缓存”,但不建议这样做,因为它以明文形式存储密码。
但
较新版本的gitgit 凭据显然存储在 中gnome-keyring,但必须正确设置。
我已经尝试在 SO 上遵循其他(非 Ubuntu)答案来使其工作(即这个),但我仍然看到用户名和密码提示。
git为 http(s)存储库存储凭据的正确和最安全的方法是什么,以及如何使它们在 Ubuntu 上工作?