First, I am sorry if this is basic question but, i am struggle with this for days.
The problem is every time i do git push (clone) to fakhrul@ipdaresss:/home/fakhrul/proj.git (or any git repo) i will get error
FATAL ERROR: Network error: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I already did lot of research and try every tutorial, but the problem still there. So, i think maybe i did miss something basic. For this, i hope you can answer as talking to really beginner.
What i use? i use Git Bash in Windows, so basically everything is simillar to linux
What i already done i have a user (fakhrul) with sudo access with functional ssh key i can ssh fakhrul@ipadress i done initial setup (firewall), install LEMP, git i successfully create plain laravel project from this tutorial
the only problem is git
Is git is properly install and setup in my local pc and server? git init works in both server and local
What i understand when to use git and what i did? but fail to clone or push
mkdir proj; cd proj ;
git init
git add *
git commit -m "first commit"
2. create repo in server with git bare
ssh fakhrul@ipaddress
mkdir proj.git; cd proj.git
git init --bare
exit
3. back in local to push to server
git remote add origin fakhrul@ipadress:/home/fakhrul/proj.git
git push origin master
then i get this
FATAL ERROR: Network error: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
sudo ufw allow git
. but i didnt think this is because i using ssh with git.These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
GREAT [solved]
What i did to solved this?
What is the problem?
I am not sure, but the problem may be because of Git and putty. I installed Git for long time ago and with less knowledge at that time. Using putty we need to run Pageant with private keys set, i dont understand this. Putty use .ppk format for private key, but i always use
ssh-keygen
in Git Bash for creating ssh keys.Thank you for everyone who views this and try to help.
:: i have new problem
write failed :connection reset by peer
, but this will go for another thread (if i cannot solved by own research)