Skip to content

Instantly share code, notes, and snippets.

@nihui
Last active October 1, 2021 07:14
Show Gist options
  • Save nihui/004b2c4319e0a7a0b1eaf3880ab9a738 to your computer and use it in GitHub Desktop.
Save nihui/004b2c4319e0a7a0b1eaf3880ab9a738 to your computer and use it in GitHub Desktop.
github-ssh-push.md
$ git push
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: 'https://github.com/nihui/ncnn.git/' 鉴权失败
$ git remote -v
origin  https://github.com/nihui/ncnn.git (fetch)
origin  https://github.com/nihui/ncnn.git (push)
$ git remote add ssh git@github.com:nihui/ncnn.git
$ git remote -v
origin  https://github.com/nihui/ncnn.git (fetch)
origin  https://github.com/nihui/ncnn.git (push)
ssh     git@github.com:nihui/ncnn.git (fetch)
ssh     git@github.com:nihui/ncnn.git (push)
$ git push ssh pnnx 
Enter passphrase for key '/home/nihui/.ssh/id_rsa': 

最后这行命令,是把你本地repo的ssh分支,push到ssh仓库上,如果是master分支,就是 git push ssh master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment