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.This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.