繁体   English   中英

git克隆文件夹未在AWS ec2 CentOS 6实例中显示

[英]git cloned folder is not showing in AWS ec2 CentOS 6 instance

我正在尝试将来自Github的公共仓库(使用通常的git clone https://github.com/<username>/<repo-name>.git命令) git clone https://github.com/<username>/<repo-name>.git到运行CentOS 6的AWS EC2实例中(登录后)当然是根,所以我可以部署它。 它说的像

Initialized empty Git repository in /root/<repo-name>/.git/

但我尝试使用cd <repo-name>但是我收到错误消息-bash: cd: <repo-folder>: No such file or directory 使用Git很长一段时间后,这是我第一次遇到这个问题。 我在网上找不到任何关于此的内容。 不完全是AWS EC 2服务器中的大师,但由于某些原因隐藏了文件夹? 这是一种奇怪的行为,我通常不会在其他系统上遇到这种行为。

编辑:这是我在终端做的(减去确切的名字)

[root@AWS-ec2-server ~]# git clone https://github.com/username/repo-name.git
Initialized empty Git repository in /root/repo-name/.git/
[root@AWS-ec2-server ~]# ls
[root@AWS-ec2-server ~]# pwd
/root
[root@AWS-ec2-server ~]#

克隆后我的回购在哪里?

编辑2:在设置SSH并使用SSH网址而不是HTTPS网址进行克隆后,我能够正常工作。

git clone git@github.com:username/repo-name.git

我仍然想知道为什么HTTPS由于某些原因不起作用。 以下是Leon要求的更多信息。

我的git版本是1.7.1

ls -al /root输出

total 76
dr-xr-x---.  8 root root 4096 Jul 11 07:46 .
dr-xr-xr-x. 22 root root 4096 Jul 11 05:52 ..
-rw-------.  1 root root 5715 Jul 11 07:21 .bash_history
-rw-r--r--.  1 root root   18 May 20  2009 .bash_logout
-rw-r--r--.  1 root root  487 Jul 11 01:28 .bash_profile
-rw-r--r--.  1 root root  292 Jul 11 01:28 .bashrc
-rw-r--r--.  1 root root  100 Sep 23  2004 .cshrc
drwxr-xr-x.  3 root root 4096 Jul 11 02:05 .gem
-rw-r--r--.  1 root root   19 Jul 11 02:05 .gemrc
-rw-r--r--.  1 root root   51 Jul 11 02:13 .gitconfig
-rw-------.  1 root root 3239 Jul 11 07:38 github
-rw-r--r--.  1 root root  742 Jul 11 07:38 github.pub
drwxr-----.  3 root root 4096 Jul 11 00:36 .pki
drwxr-xr-x. 12 root root 4096 Jul 11 02:05 .rbenv
drwx------.  2 root root 4096 Jul 11 06:53 .ssh
-rw-r--r--.  1 root root  129 Dec  3  2004 .tcshrc
drwxr-xr-x.  3 root root 4096 Jul 11 07:29 test
drwxr-xr-x. 11 root root 4096 Jul 11 07:46 texter

env|grep GIT_没有输出请求

发现由CentOS提供支持的当前AWS EC2实例无法正常运行。 我开始了一个新的, git clone工作正常,无需配置SSH来克隆它

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM