git上传到远程git服务器

  • Post author:
  • Post category:其他


Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化
$ git init
Initialized empty Git repository in D:/2019年春/一体化/.git/

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git add 一体化概要设计.docx

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git commit -m "add homework"
[master (root-commit) b3c75e3] add homework
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 "\344\270\200\344\275\223\345\214\226\346\246\202\350\246\201\350\256\276\350\256\241.docx"

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git push origin master
fatal: 'origin' 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.

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git remote add origin git@git.dev.tencent.com:qingYinGuo/onlineExamSystem.git

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git push origin master
git@git.dev.tencent.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git pull --rebase origin master
git@git.dev.tencent.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git remote add https://git.dev.tencent.com/qingYinGuo/onlineExamSystem.git
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=(push|fetch)]
                          set up remote as a mirror to push to or fetch from


Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git pull --rebase origin master
git@git.dev.tencent.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git remote add origin https://git.dev.tencent.com/qingYinGuo/onlineExamSystem.git
fatal: remote origin already exists.

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git pull --rebase origin master
git@git.dev.tencent.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$  git remote rm origin

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git remote add origin https://git.dev.tencent.com/qingYinGuo/onlineExamSystem.git

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git pull --rebase origin master
fatal: Couldn't find remote ref master

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git push -u origin master –f
error: src refspec –f does not match any.
error: failed to push some refs to 'https://git.dev.tencent.com/qingYinGuo/onlineExamSystem.git'

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$ git push origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 214.39 KiB | 11.28 MiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://git.dev.tencent.com/qingYinGuo/onlineExamSystem.git
 * [new branch]      master -> master

Sunny@DESKTOP-RB631AG MINGW64 /d/2019年春/一体化 (master)
$



版权声明:本文为qing_tian0070原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。