上传代码到Github
来源:互联网 发布:sql2000人分离数据库 编辑:程序博客网 时间:2024/06/05 19:10
这篇文章写得是windows下的使用方法。
一、:创建Github新账户
二、:新建仓库
三、:填写名称,简介(可选),勾选Initialize this repository with a README选项,这是自动创建REAMDE.md文件,省的你再创建。
四、:安装Github shell程序
五、:打开Git Shell,输入以下命令生成密钥来验证身份
ssh-keygen -C ‘your@email.address’ -t rsa
连续三个回车之后会在windows当前用户目录下生成.ssh文件夹,和linux一样。
把文件夹下的id_rsa.pub文件内容全部复制。
然后打开github账户设置,如图
打开ssh keys
右上角点击add ssh key
然后在title随便输入,key栏粘贴刚才的密钥。
六、:在Git Shell下输入命令测试刚才的公钥是否认证正确。
ssh -T git@github.com
正确结果会显示:
Warning:Permanently added ‘github.com,207.97.227.239’ (RSA) to the list of known hosts.
Hi Flowerowl! You’ve successfully authenticated, but GitHub does not provide shell access.
warning 不用理会。
七、:clone刚才新建的repository 到本地,输入命令:
git clone git@github.com:UniqueChun/scalaHDFS.git
这时会在目录下生成:
八、:将想上传的代码目录拷贝到此文件夹下:
九、:切换到Git shell 命令行下,输入命令:
git initgit commit -m 'scalaHDFS'git remote add origin git@github.com:UniqueChun/scalaHDFS.gitgit push origin master
报错处理
错误1
$ git commit -m 'scalaHDFS'On branch masterInitial commitUntracked files: scalaHDFS/nothing added to commit but untracked files present
手动添加文件
git add OperatorHDFS/*
错误2
$ git remote add origin git@github.com:UniqueChun/scalaHDFS.gitfatal: remote origin already exists.
删除之前的origin
$ git remote rm origin
错误3
$ git push origin masterEverything up-to-date
没有git commit
- 上传代码到github
- 上传代码到Github
- 上传代码到github
- 上传代码到GitHub
- 上传代码到github
- 上传代码到GitHub
- 上传代码到github
- 上传代码到github
- 上传代码到gitHub
- 上传代码到GitHub
- 上传代码到github
- 上传代码到github
- 上传代码到Github
- 上传本地代码到github
- git上传代码到github
- 上传项目代码到github
- 上传本地代码到github
- 如何上传代码到GitHub
- SOM神经网络进行模式识别
- Andoid Java Mail 发送邮件 QQ邮箱
- MT 201 Multiple Financial Institution Transfer for its Own Account多金融机构为自己账户转账
- T
- eclipse如何创建servlet
- 上传代码到Github
- UI控件-> Scroll Pane(滑动面板)
- computer vision
- [51nod1450]闯关游戏
- ZOJ Crusaders Quest (2017CCPC秦皇岛赛区)
- 何满园的第一篇博客
- 【Unity Shader入门精要】— 高级篇
- MT 202 COV General Financial Institution Transfer 覆盖一般金融机构转账
- QEMU支持的网络模式