假设我有一个目录/X/Y,这是一个git存储库.有可能以某种方式git pull从内部调用命令/X,但目标是该/X/Y目录?
编辑:我想我特别想知道:是否可以使用git命令执行此操作,但无需更改目录?
注意:我接受了VonC的答案,因为它比以前的选项更优雅.对于运行Git低于1.8.5的人,请参阅下面的bstpierre的答案.
我正在使用jenkins并尝试连接到位桶远程存储库,因为我在git存储库中的源代码管理中提供了位桶URL,我还为凭据中添加的位桶帐户创建凭据
我在git存储库中尝试了以下内容
https://nagarjun123@bitbucket.org/gsmohan/quickride.git
Run Code Online (Sandbox Code Playgroud)
但它给出了下面指定的错误:
错误:无法连接到存储库:无法使用凭据bitbucket帐户(状态= 401)连接到https://nagarjun123@bitbucket.org/gsmohan/quickride.git
谁能请帮帮我?
通过https代理使用时,命令"git clone https://github.com/user/project.git "超时.
我以前成功地在代理后面运行了git,并且已经阅读了与git和代理使用相关的其他stackoverflow.现在我已经在我当前组织的主机上配置它以使用非身份验证代理,但它已超时.
有谁之前经历过这个吗?有什么提示吗?
这是系统版本:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Run Code Online (Sandbox Code Playgroud)
这是git版本和更新信息(RH中最新版本)
$ git --version
git version 1.7.11.3
$ sudo yum check-update git
Loaded plugins: downloadonly, rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Run Code Online (Sandbox Code Playgroud)
这是相关的环境变量:
$ export | grep http
declare -x http_proxy="http://proxy.hostname:3128/"
declare -x https_proxy="http://proxy.hostname:3128/"
Run Code Online (Sandbox Code Playgroud)
这是我的.gitconfig(用于冗余):
$ cat ~/.gitconfig
[http]
proxy = http://proxy.hostname:3128/
[https]
proxy = http://proxy.hostname:3128/ …Run Code Online (Sandbox Code Playgroud) 我是OS X的新手,无法在任何地方找到解决方法.我安装了git,但安装搞砸了,我不得不删除它.我使用最新的git dmg文件安装它,但无论何时我输入
git
Run Code Online (Sandbox Code Playgroud)
我明白了
-bash: /usr/bin/git: No such file or directory
Run Code Online (Sandbox Code Playgroud)
这是因为git没有安装在该目录中,而是安装在/ usr/local/bin/git中
如果我输入目录的整个路径,而不是输入正确的输出.
那么我做错了什么以及如何解决?谢谢.
我尝试克隆一些存储库,但总是得到相同的错误。我在哪里可以找到有关此错误的更多信息(错误日志文件或类似内容),或者有人知道可能是什么错误?
# git clone http://github.com/creationix/nvm.git .nvm
Initialized empty Git repository in /home/marcin/.nvm/.git/
error: while accessing http://github.com/creationix/nvm.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
或者
# git clone https://gitlab.com/jmis/exilecraft.git
Initialized empty Git repository in /home/marcin/exilecraft/.git/
error: while accessing https://gitlab.com/jmis/exilecraft.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
我使用的是 CentOS 6.8 和 Git 1.7.1
----------
将 Git 升级到 2.12.0 后编辑我有错误消息:
# git clone https://github.com/creationix/nvm.git .nvm
Cloning into '.nvm'...
fatal: unable to access 'https://github.com/creationix/nvm.git/': Problem with the SSL CA cert (path? access rights?)
Run Code Online (Sandbox Code Playgroud) 当我在 Windows 或 Ubuntu 上安装 git 时,我得到的最新版本的 git 接近此处列出的版本:
https://github.com/git/git/releases
然而,当我在 centos Linux 上安装 git 时,我得到的是旧版本的 git:
yum check-update
yum install -y git
git --version
git version 1.8.3.1
Run Code Online (Sandbox Code Playgroud)
1.8.3.1 版本太旧了。我想我在这里遗漏了一些东西。
为什么我在 centos 上得到这么旧版本的 git?