1

何かを github にプッシュしようとすると、このエラーが発生します。

Robbies-MacBook-Pro:assn-6-huffman-mac user$ git push -u origin master
fatal: repository 'https://github.com/BitMechanic/Stanford-CS106b/Huffman.git/' not found

次に、チェックするとこれが得られます。

Robbies-MacBook-Pro:assn-6-huffman-mac user$ git remote add origin https://github.com/BitMechanic/Stanford-CS106b/Huffman 

fatal: remote origin already exists.

Robbies-MacBook-Pro:assn-6-huffman-mac user$ git remote -v

origin  https://github.com/BitMechanic/Stanford-CS106b/Huffman.git
(fetch)

origin  https://github.com/BitMechanic/Stanford-CS106b/Huffman.git
(push)

私が間違っていることを知っている人はいますか?

4

2 に答える 2

2

使用する適切な URL (複製してからオリジンをプッシュするため) は次のとおりです。

https://github.com/BitMechanic/Stanford-CS106b.git

いいえ:

https://github.com/BitMechanic/Stanford-CS106b/Huffman.git

Stanford-CS106bd の BitMechanic のリポジトリ ページにリストされているリポジトリです。Stanford-CS106b/Huffmanではありません。

これを修正するには、 次のgit remoteコマンドを参照してください。

git remote rm origin
git remote add origin https://github.com/BitMechanic/Stanford-CS106b.git

または、より簡単に:

git remote set-url origin https://github.com/BitMechanic/Stanford-CS106b.git
于 2013-07-07T09:30:20.293 に答える
0

貼り付けられますか

$cat .git/config

参考までにここに出力します。

動作がおかしいリモートをそこから削除し、再度 git remote add コマンドを使用して追加し直す方がよい場合もあります。

于 2013-07-07T07:59:33.183 に答える