前提・実現したいこと
実現したいこと:gitにpushしたい。
前提:
git addやgit statusなどを使い、プロジェクトの変更を正常に反映、またその確認はできるが、pushだけができない。
試したこと
gitでPlease make sure you have the correct access rights and the repository exists. が出た時の対処法
https://qiita.com/GakuNaitou/items/81dbbd3ea6211af71648
を参考にしてsshの公開鍵,秘密鍵を再発行し、githubに登録し、
configファイルにも記載しましたが、それでもまだ同じエラーが発生します。
以下は実際のログ(git addをしたあとに何も変更を加えていない状態ですが1からなぞりました)と、
細々とした箇所のスクショです。
alcohole:~/environment $ cd djangogirls alcohole:~/environment/djangogirls (master) $ python3.6 -mvenv myvenv alcohole:~/environment/djangogirls (master) $ source myvenv/bin/activate (myvenv) alcohole:~/environment/djangogirls (master) $ git init Reinitialized existing Git repository in /home/ec2-user/environment/djangogirls/.git/ (myvenv) alcohole:~/environment/djangogirls (master) $ git add . (myvenv) alcohole:~/environment/djangogirls (master) $ git commit -m "Initialize repository" (myvenv) alcohole:~/environment/djangogirls (master) $ git commit -m "Initialize repository" On branch master nothing to commit, working tree clean (myvenv) alcohole:~/environment/djangogirls (master) $ git remote add origin git@github.com:Username/repositoryname.git fatal: remote origin already exists. (myvenv) alcohole:~/environment/djangogirls (master) $ git remote -v origin git@github.com:KentoHomma/my_first_blog2.git (fetch) origin git@github.com:KentoHomma/my_first_blog2.git (push) (myvenv) alcohole:~/environment/djangogirls (master) $ git push -u origin --all Bad owner or permissions on /home/ec2-user/.ssh/config fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. (myvenv) alcohole:~/environment/djangogirls (master) $ ssh-keygen -t rsa -C sigareeeta@gmail.com Generating public/private rsa key pair. Enter file in which to save the key (/home/ec2-user/.ssh/id_rsa): /home/ec2-user/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/ec2-user/.ssh/id_rsa. Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub. The key fingerprint is: SHA256:4C1K28nSIblwzebrDhRBTLaTT27TBg5bezHGhK4bk/A sigareeeta@gmail.com The keys randomart image is: +---[RSA 2048]----+ | += .. | | ..+.o | | *.= = | | . /.B o | | .oBo# S | | =E% B | | *+* | | .o . | | o+ | +----[SHA256]-----+ (myvenv) alcohole:~/environment/djangogirls (master) $ less ~/.ssh/id_rsa.pub (myvenv) alcohole:~/environment/djangogirls (master) $ vi ~/.ssh/config (myvenv) alcohole:~/environment/djangogirls (master) $ git push -u origin --all Bad owner or permissions on /home/ec2-user/.ssh/config fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. (myvenv) alcohole:~/environment/djangogirls (master) $
□$ less ~/.ssh/id_rsa.pubで得た公開鍵
補足情報(FW/ツールのバージョンなど)
server EC2
platform AmazonLinux
IDE AWS Cloud 9
Git 2.14
Python 3.6.8
Django 2.0.2
何か思い当たる手掛かりがあれば教えていただけると幸いです。
よろしくお願い申し上げます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/10/31 06:37