2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Githubサポートに問い合わせてみた。

Posted at

#ありがとうステーシー
##gitからgithubへのプッシュがうまくできなかったので、聞いてみた。

  1. git push -u origin master
  • Warning: Permanently added the RSA host key for IP address '192.30.255.***' 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.
  • 警告が出ました。
  1. cd ~/.ssh
  2. ssh-keygen -t rsa
  • 鍵を生成
  1. pbcopy < ~/.ssh/id_rsa.pub
  • クリップボードに鍵をコピー
  • githubのsettingページSSH keysにコピペで貼付
  1. ssh -T git@github.com
  • Hi abcde111! You've successfully authenticated, but GitHub does not provide shell access.
  • Githubのアカウント(ex.abcde111)と接続ができたようです。
  1. git push -u origin master
  • もう一度git pushしてみる
  • fatal: not a git repository (or any of the parent directories): .git
  • githubにレポジトリが作成されていなかったので、fatalエラーが発生
  • github.comからpublic repository(ABCDE123)を作成して再挑戦。

git push -u origin master

fatal: remote error:
is not a valid repository name
Email support@github.com for help
サポートへメールを送るようにメッセージが出現。
SSH接続が完了済みで、"git push"がうまく行かない旨を伝えると、打ったコマンドを送るよう依頼されたので、ログとして添付ファイルを送る。

返信が来ました。

I believe the following command should update your remote url to use SSH:
git remote set-url origin git@github.com:abcde111/ABCDE123.git
何も起こらない。
git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use

git push --set-upstream origin master

Githubのレポジトリにファイルが!!!9個アップロードされました。

Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 2.69 KiB | 1.35 MiB/s, done.
Total 9 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/abcde111/ABCDE123/pull/new/master
remote:
To github.com:abcde111/ABCDE123.git

  • [new branch] master -> master
    Branch 'master' set up to track remote branch 'master' from 'origin'.

めでたし。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?