Open webmarts2019 opened 4 years ago
Getting similar error for private repo
=== ERROR: Pull failed using GIT /usr/bin/git
and DIR /var/www/xxxx
===
fatal: could not read Username for 'https://github.com': No such device or address
Ok i got this working. The problem is the folder permission for your GIT folder, it needs to be www-data (or httpd/apache user, the PHP file is run by apache user, so the git folder should be your apache user.)
You need to have the public keys generated for www-data user (or apache/httpd user based on your server configuration).
sudo -i
cd /var/www
mkdir .ssh chown -R www-data:www-data .ssh
sudo -u www-data ssh-keygen -t ed25519 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
tail /var/www/.ssh/id_ed25519.pub
sudo -u www-data ssh -T git@github.com
Copy/Add the key displayed above in tail command to your github account or repo, Repo->Settings->Deploy Keys.
Cd to your git folder for e.g /var/www/my-project folder nano .git/config
Change
url = https://github.com/username/reponame
to
url = git@github.com:username/reponame.git
Hi, I follow the steps above, but still get error as below: can anyone help out~
=== ERROR: Pull failed using GIT /usr/bin/git
and DIR /opt/bitnami/apache2/htdocs/
===
Could not create directory '/usr/sbin/.ssh'.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Hi I am trying to use this script for private repository, but its not working, although SSH is set up properly n gitlab but if I try to test
" fatal: could not read Username for 'https://gitlab.com': No such device or address HEAD is now at df699ba Add new file"