前提
使用ツール:
sourcetree
vertion:2.32.1
質問の内容
sourcetreeとgitHubを連携して、アプリを作成していて
今回が初めてのコミットプッシュではありません。
下記の記事と同じような現象だと思うのですが、下記通りにしても上手くいきません。。
https://kantaro-cgi.com/blog/git/bitbucket-permission-error.html
sourcetreeから変更ファイルをコミットプッシュすると
下記のエラーが出てコミットプッシュやpullも出来なくなりました。
git -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/better-env:refs/heads/better-env Pushing to github.com:xxxx/blogapp.git 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. Pushing to github.com:xxxx/blogapp.git 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. Completed with errors, see above
翻訳:
「git -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags --set-upstream origin refs/heads/better-env:refs/heads/better-env github.com:xxxx/blogapp.git にプッシュします。 git@github.com。アクセス権が拒否されました (publickey)。 fatal: リモートリポジトリから読み取れませんでした。 正しいアクセス権を持っているか、リポジトリが存在するか確認してください リポジトリが存在することを確認してください。 github.com:xxxxx/blogapp.git にプッシュしています。 git@github.com。パーミッションが拒否されました(publickey)。 fatal: リモートリポジトリから読み取れませんでした。 正しいアクセス権があるかどうか確認してください リポジトリが存在することを確認してください。 エラーで完了、上記参照」
全部消してsourcetreeを作り直すべきでしょうか?
試したこと
①sourcetreeのリモートリポジトリパスをsshからhttpsに変更しました。
→pullはできるようになりましたが、pushが出来ません。
https://kantaro-cgi.com/blog/git/bitbucket-permission-error.html
②~/.ssh/configに設定ファイルを作成しました。
→上手くいきませんでした。
https://www.kadinche.com/github-%E6%8E%A5%E7%B6%9A%E6%99%82%E3%81%AE-ssh-config-%E3%81%AE%E6%9B%B8%E3%81%8D%E6%96%B9/
③ブランチの再作成
以上、ご教授お願い致します。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2022/09/19 13:17