WEIXINCN Telegram 368740
上传本地代码到github详解

一、(无github账号的)注册,登录github,创建repository,设置访问权限

image.png

image.png

image.png
复制https地址https://github.com/loveGithubs/test1
二、建立git仓库
2.1、cd到本地项目目录,执行git命令
git init
2.2、将项目的所有文件添加到仓库中
git add .
2.3、提交代码到仓库
git commit -m "commit code"
2.4、本地仓库关联github
git remote add origin https://github.com/loveGithubs/test1
注意:链接地址不要带.git,否则可能报错fatal: unable to access 'https://github.com/loveGithubs/test1.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
2.5、上传到git远程仓库
git push -u origin main
成功:

image.png
如遇到remote: Support for password authentication was removed on August 13, 2021,即密码凭证从2021年8月13日开始无法使用,必须用token的报错。解决方案:
1、登录自己的github账号,选择settings

image.png

2、选择developer settings

image.png
3、选择Personal access tokens和Generate new token

image.png
4、设置token的有效期,访问权限等

注意:要使用token从命令行访问仓库,请选择repo;要使用token从命令行删除仓库,请选择delete_repo

image.png
4.1、点击生成令牌 Generate token

image.png
5、复制token,粘贴到在push代码时要求输入密码的位置,push即可

image.png

via 简书



tgoop.com/weixinCN/368740
Create:
Last Update:

上传本地代码到github详解

一、(无github账号的)注册,登录github,创建repository,设置访问权限

image.png

image.png

image.png
复制https地址https://github.com/loveGithubs/test1
二、建立git仓库
2.1、cd到本地项目目录,执行git命令
git init
2.2、将项目的所有文件添加到仓库中
git add .
2.3、提交代码到仓库
git commit -m "commit code"
2.4、本地仓库关联github
git remote add origin https://github.com/loveGithubs/test1
注意:链接地址不要带.git,否则可能报错fatal: unable to access 'https://github.com/loveGithubs/test1.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
2.5、上传到git远程仓库
git push -u origin main
成功:

image.png
如遇到remote: Support for password authentication was removed on August 13, 2021,即密码凭证从2021年8月13日开始无法使用,必须用token的报错。解决方案:
1、登录自己的github账号,选择settings

image.png

2、选择developer settings

image.png
3、选择Personal access tokens和Generate new token

image.png
4、设置token的有效期,访问权限等

注意:要使用token从命令行访问仓库,请选择repo;要使用token从命令行删除仓库,请选择delete_repo

image.png
4.1、点击生成令牌 Generate token

image.png
5、复制token,粘贴到在push代码时要求输入密码的位置,push即可

image.png

via 简书

BY 微信订阅号 weixinCN












❌Photos not found?❌Click here to update cache.


Share with your friend now:
tgoop.com/weixinCN/368740

View MORE
Open in Telegram


Telegram News

Date: |

To upload a logo, click the Menu icon and select “Manage Channel.” In a new window, hit the Camera icon. Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place. Hashtags fire bomb molotov November 18 Dylan Hollingsworth yau ma tei The SUCK Channel on Telegram, with a message saying some content has been removed by the police. Photo: Telegram screenshot.
from us


Telegram 微信订阅号 weixinCN
FROM American