Git “does not appear to be a git repository”

前端 未结 3 775
自闭症患者
自闭症患者 2020-12-03 04:47

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

相关标签:
3条回答
  • 2020-12-03 05:36

    Or, you can simply use:

    git clone user@server:/full/path/to/your/directory
    
    0 讨论(0)
  • 2020-12-03 05:39

    May be you forgot to run git --bare init on the remote folder That was my problem

    0 讨论(0)
  • 2020-12-03 05:49

    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.

    0 讨论(0)
提交回复
热议问题