本文介绍了Git“似乎不是git仓库”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在服务器上安装git,并且在尝试执行第一次推送时遇到了一些问题。
我在服务器上成功安装了git,在本地和服务器上创建了存储库,但是当我尝试进行第一次推送时,我收到以下消息:

  stdin:不是tty 
致命:'/my_repo.git'似乎不是git存储库
致命:远程端意外挂起

我使用了它并遵循了我可以找到的所有内容,但没有成功。什么可能是错误的?

解决方案

我会假设您使用ssh克隆您的repo。

这意味着你需要在你的ssh地址服务器上的回购完整路径:

  git克隆ssh:// sshuser @ serverIP /完整/绝对/路径/到/ my_repo 

注意:if你的'my_repo'是一个纯粹的(允许推送),那将是:
$ b $ pre $ g $克隆ssh:// sshuser @ serverIP / full / absolute / path / to / my_repo.git

stdin :不是tty 仅仅意味着在 sshuser 账户的 .bashrc 中,有些东西期待输入。

I am trying to install git on a server and have some problem when I try to perform the first push.I successfully installed git on the server, created the repository locally and on the server but when I try to make the first push I get this message:

stdin: is not a tty
fatal: '/my_repo.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I googled it and followed everything I could find but nothing worked. What could be wrong?

解决方案

I will assume you are using ssh to clone your repo.

That means you need the full path of the repo on the server in your ssh address:

git clone ssh://sshuser@serverIP/full/absolute/path/to/my_repo

Note: if your 'my_repo' is a bare one (to allow pushing), that would be:

git clone ssh://sshuser@serverIP/full/absolute/path/to/my_repo.git

The stdin: is not a tty simply means that in the .bashrc of the sshuser account, there is something expecting an input.

这篇关于Git“似乎不是git仓库”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 09:20