J'ai créé un dépôt privé, mais je ne peux pas y pousser depuis le terminal [dupliquer]

Aug 19 2020

J'ai créé un projet dans mon terminal, Ubuntu. J'ai ensuite fait

git init
git add .
git commit -m "fc"

Ensuite, j'ai créé un dépôt privé sur github.

Finalement,

~$ git remote add github.com/my-user-name/XXXXXXX.git ~$ git push -u origin master

Mais j'obtiens cette erreur

fatal: 'github.com/my-user-name/XXXXXXX.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

J'ai configuré SSH avec cet ordinateur.

Merci pour l'aide.

Réponses

1 wjandrea Aug 19 2020 at 10:14

Vous devez spécifier le protocole, comme https://ou git://. Sans le protocole, l'URL fait référence à un fichier sur votre ordinateur , qui n'existe probablement pas.

Donc par exemple,

git remote add origin https://github.com/my-user-name/XXXXXXX.git