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?
The “fatal: 'origin' does not appear to be a git repository” error occurs when you try to push code to a remote Git repository without telling Git the location of the remote repository. To solve this error, use the git remote add command to add a remote to your project.
The “… does not a appear to be a git repository” error is triggered when you try to clone, or run other commands, in a directory that is not recognized as a Git repository. The directory or remote file path might not have initialized Git, or the file path you are trying to access as an active repository is incorrect.
The “Please make sure you have the correct access rights” error occurs if you do not have the right permissions to access a Git repository. To solve this error, make sure you are referring to the correct remote URL and that you have set up SSH authentication correctly.
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.
May be you forgot to run git --bare init
on the remote folder That was my problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With