title: Git push: "ERROR: Repository not found' - "fatal: Could not read from remote repository"
body: <h2>In short</h2>
  
  <p><strong>Goal:</strong> to perform one successful git push using ssh instead of https.</p>
  
  <p><strong>Problem:</strong> "ERROR: Repository not found. Fatal: Could not read from remote repository".</p>
  
  <h2>Step-by-step background</h2>
  
  <p>I’m working with an Ubuntu remote server (a droplet by DigitalOcean) and a Github account. I created an ssh public key on my Ubuntu remote server and used it to create a new ssh key on Github. Then I changed my remote’s URL from https to ssh with the git remote set-url command:</p>
  
  <pre><code>git remote set-url origin git@github.com:[username]/[repository].git
  </code></pre>
  
  <p>Following that, I tested if things worked:</p>
  
  <pre><code>root@[DropletName]:/srv/test_git_folder# ssh -T git@github.com
  The authenticity of host 'github.com (140.87.148.9)' can't be established.
  RSA key fingerprint is SHA365:mVhbp6kXUbJWCl7E1IGOCspRamTxdCARLviWk6F5SY9.
  Are you sure you want to continue connecting (yes/no)? yes
  Warning: Permanently added 'github.com,140.87.148.9' (RSA) to the list of known hosts.
  Hi [Username]! You've successfully authenticated, but GitHub does not provide shell access.
  </code></pre>
  
  <p>At this point I tried to create a short text file...</p>
  
  <pre><code>root@[DropletName]:/srv/test_git_folder# nano testfile2.txt
  [nano text editor appears; I input "Hello world!", save and close]
  </code></pre>
  
  <p>...and push it to github</p>
  
  <pre><code>root@[DropletName]:/srv/test_git_folder# git add *
  root@[DropletName]:/srv/test_git_folder# git commit -m "test push"
  [master 5b6bcb0] test push
   1 file changed, 1 insertion(+)
   create mode 100644 testfile2.txt
  </code></pre>
  
  <p>But in the end I got an error message:</p>
  
  <pre><code>root@[DropletName]:/srv/test_git_folder# git push –u origin master
  
  ERROR: Repository not found.
  fatal: Could not read from remote repository.
  
  Please make sure you have the correct access rights
  and the repository exists.
  </code></pre>
  
  <p>How can I fix that?</p>
  
  <p>(I've been unsuccessfully looking at a some similar questions, including the following: 
  - <a href="https://stackoverflow.com/questions/51133215/git-could-not-read-from-remote-repository">Git : Could not read from remote repository</a>
  - <a href="https://stackoverflow.com/questions/31885482/centos-git-fatal-could-not-read-from-the-remote-repository">CentOS: Git: &quot;fatal: could not read from the remote repository&quot;</a>
  - <a href="https://stackoverflow.com/questions/16118797/git-push-to-remote-repository-could-not-read-from-remote-repository">git push to remote repository &quot;Could not read from remote repository&quot;</a>)</p>