如何使用 eclipse 将代码提交到 GitHub 服务器?
当我运行这个命令时
git push -u origin master
显示如下错误
error: The requested URL returned error: 403 while accessing https://github.com/something/something
最佳答案
我不是专家,但我做过一次
认为简单直接的方法是
1.下载Git到你的系统
2.cd 到你的eclipse prject cd/workspace/sampleproject
3.命令
git config --global user.name "Your Name Here"
git config --global user.email "your_email@youremail.com"
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/gitusername/reposname.git
git push -u origin master this line may throw an error but no problem
4.从eclipse ->Help->eclipse marketplace ->搜索'git' -> 安装'Egit-git team provider'
5.进入eclipse ->Windows ->Open perspective ->Git repository
6.从左侧的“添加现有本地存储库”的 Git 存储库 View ,然后浏览到“/workspace/sampleproject”
7.现在右键单击这个添加的存储库位置并添加评论按提交。
8.现在右击这个添加的Repository点击Push
By default Configured remote repository should be checked then press Next
From Source Ref and Destination Ref Select HEAD //you may change if u want
Select next give your github username and password then click on Finish.
关于eclipse - 将代码从 eclipse 提交到 GitHub,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14495934/