Githubにメンバー (collaborator とも言います) を追加するには以下の手順で行いますが、この確認メールをクリックしても 404 エラーになるときがあります。その対策です。
カテゴリー: Git
プッシュできない、プルもできない、という状態 の対策
GitでPushしようとしたらエラーによりPullできなくて、「あー、プルが必要なのね」となってpullしようとしてもプル出来ない場合があります。
その場合の対策です。
1 2 3 4 5 6 7 8 9 |
$ git push -u origin master To https://github.com/YOURNAME/REPOSITORY.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/YOURNAME/REPOSITORY.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. |
Git の error: src refspec master does not match any の 対策
Git で error: src refspec master does not match any というエラーが出る場合がります。それはわかるんですが、私の場合、別におかしなこともしてないのにこのエラーが発生しました。
1 2 3 |
$ git push -u origin master error: src refspec master does not match any error: failed to push some refs to 'https://github.com/ユーザ名/リポジトリ.git' |
“Git の error: src refspec master does not match any の 対策” の続きを読む
You recently used a password to access the repository と表示される場合の対策
Github から以下のようなメールが来て警告を受ける場合があります。
1 2 3 4 5 6 7 8 9 10 |
[GitHub] Deprecation Notice Hi , You recently used a password to access the repository at REPOSITORY with git using git/2.26.0.windows.1. Basic authentication using a password to Git is deprecated and will soon no longer work. Visit https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information around suggested workarounds and removal dates. Thanks, The GitHub Team |
この場合の原因と対策です。
“You recently used a password to access the repository と表示される場合の対策” の続きを読む
macOS ターミナル にて、git や brew などのコマンドがフリーズするときの解決策
Gitが入っているはずなのに、 ターミナル が動かなくなったり、そもそもバージョン確認のために
1 |
git --version |
と入力しても、このコマンドさえフリーズすることがあります。
このような場合、別のコマンドを入力しようとしても同様にコンソールがフリーズすることがあります。
git のリモートリポジトリの設定を間違えた場合の対応
gitでプッシュした際に、
1 2 |
$ git push -u origin master remote: Not Found |
と表示された場合、リモートリポジトリの設定が間違っています。
この場合の対応です。
Git The current branch sample has no upstream branch. の対策
Git にて、 The current branch sample has no upstream branch. と表示された場合の対策です。
1 2 3 4 5 6 |
$ git push fatal: The current branch sample has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin sample |
“Git The current branch sample has no upstream branch. の対策” の続きを読む
Gitエラー対策 error: RPC failed; curl 56 OpenSSL LibreSSL SSL_read: Connection was reset, errno と表示された場合の回避策
SSL接続しているGitのClone時や、Push時に、このようなエラーが発生することがあります。
エラーメッセージは以下の場合があります。
1 2 3 |
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054 error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054 |
gitbash remote: Repository not found./ fatal: repository ‘https~’ not found 対策
WindowsでGitを使用するためのツール、 Gitbash では、別のアカウントにPushしようとすると以下のようなエラーが出ることがあります。
2020/08/01 記事の最下部に Macの場合の処理を追加しました。
1 2 3 4 5 6 |
$ git remote add origin https://github.com/USERNAME/REPOSITORY.git $ git push -u origin master remote: Repository not found. fatal: repository 'https://github.com/USERNAME/REPOSITORY.git/' not found |
このような場合の対処法
“gitbash remote: Repository not found./ fatal: repository ‘https~’ not found 対策” の続きを読む
Git 関連の無料書籍 Amazon Unlimited
Git 関係の無料書籍です。Amazon Unlimitedに入っていれば無料で読めます。