Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Saturday, August 3, 2019

Could not read from remote repository

Got this error when pushing code to GitHub:

Developers-iMac:experiment-react-route-based-lazy-load dev$ git push -u origin master
Warning: Permanently added the RSA host key for IP address '13.250.177.223' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


One solution that works:

Developers-iMac:experiment-react-route-based-lazy-load dev$ git remote set-url origin https://github.com/ienablemuch/experiment-react-route-based-lazy-load
Developers-iMac:experiment-react-route-based-lazy-load dev$ git push -u origin masterEnumerating objects: 28, done.
Counting objects: 100% (28/28), done.
Delta compression using up to 8 threads
Compressing objects: 100% (28/28), done.
Writing objects: 100% (28/28), 302.35 KiB | 12.09 MiB/s, done.
Total 28 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), done.
To https://github.com/ienablemuch/experiment-react-route-based-lazy-load
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

Got the solution from: https://stackoverflow.com/questions/21255438/permission-denied-publickey-fatal-could-not-read-from-remote-repository-whil/55239661#55239661

Tuesday, December 13, 2016

Make gpg-signing work with WebStorm git commit

Add these two lines, on ~/.gnupg/gpg.conf:

no-tty
use-agent


Install the following tools using brew:
$ brew install gnupg gnupg2 pinentry-mac


Add this in ~/.gnupg/gpg-agent.conf (gpg-agent.conf not yet existing on my machine):
pinentry-program /usr/local/bin/pinentry-mac 

Run this:
$ git config --global gpg.program $(which gpg)


Solution seen here: https://youtrack.jetbrains.com/issue/IDEA-110261


Happy Coding!