RailsアプリをGitにpushしましたが、間違ったurlでpushしてしまい、正規のurlに入力し直してpushしても前のurlが残っていてerroeが発生してまい、やり直しが出来ずに困っております。
間違ったurlと実行した内容は以下になります。
$ git add . $ git status $ git commit -m "first" ここでgithub.com をgithun.com と打ち込んでいました。(気付きませんでした。) $ git remote add origin https://githun.com/hogehoge/hoge.git $ git push -u origin master ここまで実行してしまいエラ-が発生 error: SSL: certificate subject name '*.parkingcrew.net' does not match target host name 'githun.com' while accessing https://githun.com/hogehoge/hoge.git/info/refs
間違いに気づき再度実行
$ git add . $ git status $ git commit -m "first" 正しいurlに直して実行 $ git remote add origin https://github.com/hogehoge/hoge.git $ git push -u origin master しかし同じエラーが発生 error: SSL: certificate subject name '*.parkingcrew.net' does not match target host name 'githun.com' while accessing https://githun.com/hogehoge/hoge.git/info/refs 間違ったurlが記憶されているみたいでダメでした。
やったこと
logを見てみる $ git log commit 8ea5c4ced94536c2ee92e042a4cf69b6c37d0474 Author: vagrant <vagrant@localhost.localdomain> Date: Thu Aug 1 22:34:57 2019 +0900 first $ git branch * master $ git revert usage: git revert [options] <commit-ish> -n, --no-commit don't automatically commit -e, --edit edit the commit message -x append commit name when cherry-picking -r no-op (backward compatibility) -s, --signoff add Signed-off-by: -m, --mainline <n> parent number --rerere-autoupdate update the index with reused conflict resolution if possible
サイトで調べてみて $ git push -f origin master #同じエラーが発生 $ git revert HEAD fatal: Cannot revert a root commit $ git reset --hard HEAD^
とかいろいろやってみましたが、push してみても同じ状況でした。
どなたか解決方法をご教授お願いできませんでしょうか?
宜しくお願いいたします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/01 14:47 編集
2019/08/01 14:49
2019/08/01 14:50
2019/08/01 15:12
2019/08/01 15:38
2019/08/01 21:51
2019/08/02 01:12
2019/08/02 01:14
2019/08/02 01:23