转自   https://blog.csdn.net/u010042585/article/details/79378726

将本地项目push到GitHub时遇到的问题

、$ git remote add origin时出现fatal: remote origin already exists.错误
只要执行一下git remote rm origin 在执行git remote add origin 就可以啦 、执行git push -u origin master(使用的时HTTPS连接,没有验证SSH连接)时出现remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com问题解决办法:
在输入Username for 'https://github.com': XXX 后弹出的窗口需要输入密码,这个密码不是GitHub登录密码而是gitab 的访问令牌 、$ git push -u origin master
fatal: HttpRequestException encountered. Username for 'https://github.com':
To https://github.com/
! [rejected] master -> master (fetch first)
error: failed to push some refs to
错误解决办法
执行一下:git pull --rebase origin master 、 [root@node2 learngit]# git push origin master
To http://192.168.0.74:9675/zihao/test.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'http://192.168.0.74:9675/zihao/test.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 解决: 先pul 再push [root@node2 learngit]#git pull http://192.168.0.74:9675/zihao/test.git
[root@node2 learngit]# git push origin master

git_push报错的更多相关文章

  1. Windows 7上执行Cake 报错原因是Powershell 版本问题

    在Windows 7 SP1 电脑上执行Cake的的例子 http://cakebuild.net/docs/tutorials/getting-started ,运行./Build.ps1 报下面的 ...

  2. 关于VS2015 ASP.NET MVC添加控制器的时候报错

    调试环境:VS2015 数据库Mysql  WIN10 在调试过程中出现类似下两图的同学们,注意啦. 其实也是在学习的过程中遇到这个问题的,找了很多资料都没有正面的解决添加控制器的时候报错的问题,还是 ...

  3. php报错 ----> Call to undefined function imagecreatetruecolor()

    刚才在写验证码的时候,发现报错,然后排查分析了一下,原来是所用的php版本(PHP/5.3.13)没有开启此扩展功能. 进入php.ini 找到extension=php_gd2.dll ,将其前面的 ...

  4. scp报错 -bash: scp: command not found

    环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...

  5. VS2015使用scanf报错的解决方案

    1.在程序最前面加: #define _CRT_SECURE_NO_DEPRECATE 2.在程序最前面加: #pragma warning(disable:4996) 3.把scanf改为scanf ...

  6. VS项目中使用Nuget还原包后编译生产还一直报错?

    Nuget官网下载Nuget项目包的命令地址:https://www.nuget.org/packages 今天就遇到一个比较奇葩的问题,折腾了很久终于搞定了: 问题是这样的:我的解决方案原本是好好的 ...

  7. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  8. Android——eclipse下运行android项目报错 Conversion to Dalvik format failed with error 1解决

    在eclipse中导入android项目,项目正常没有任何错误,但是运行时候会报错,(clean什么的都没用了.....)如图: 百度大神大多说是jdk的问题,解决: 右键项目-Properties如 ...

  9. 报错:You need to use a Theme.AppCompat theme (or descendant) with this activity.

    学习 Activity 生命周期时希望通过 Dialog 主题测试 onPause() 和 onStop() 的区别,点击按钮跳转 Activity 时报错: E/AndroidRuntime: FA ...

随机推荐

  1. Tomcat 项目结构完整解析

    本文主要为了对我们平时Tomcat中,我们经常会涉及到的项目结构做一个解析,以便可以一目了然的知道有哪些结构及其作用. 最近一直在思考,怎么样才能一目了然,初步考虑,即用浏览器打开页面,不用往下滑动, ...

  2. linux下18种监测网络带宽方式

    1. nload nload是一个命令行工具,让用户可以分开来监控入站流量和出站流量.它还可以绘制图表以显示入站流量和出站流量,视图比例可以调整.用起来很简单,不支持许多选项. 所以,如果你只需要快速 ...

  3. OPT

    http://cdn.imgtec.com/sdk-documentation/PowerVR.Performance+Recommendations.pdf 宝贝 https://developer ...

  4. 新安装的Ubuntu如何切换到root的方法

    Ubuntu中root用户和user用户的相互切换Ubuntu是最近很流行的一款Linux系统,因为Ubuntu默认是不启动root用户,现在介绍如何进入root的方法.    (1)从user用户切 ...

  5. vs调试 iis发布之后的项目

    方法一 启动vs  访问iis地址 即可调试 方法二 点击调试, 选择附加到进程 选择所有用户进程,  选择w3wp.exe  ,附加 , 即可调试

  6. Codeforces Round #442 (Div. 2) B题【一道模拟题QAQ】

    B. Nikita and string One day Nikita found the string containing letters "a" and "b&qu ...

  7. @ControllerAdvice与@ControllerAdvice统一处理异常

    https://blog.csdn.net/zzzgd_666/article/details/81544098(copy) 详细看此 所以结合上面我们可以知道,使用@ExceptionHandler ...

  8. @MapperScan和@ComponentScan的区别

    区别 今天在撸SpringBoot的时候,突然对注解产生了混淆,@MapperScan和@ComponentScan都是扫描包,二者之间有什么区别呢? 首先,@ComponentScan是组件扫描注解 ...

  9. ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

    https://blog.csdn.net/qq_15071263/article/details/78459087 1. 警告解读 ** WARNING ** : Your ApplicationC ...

  10. idea快捷方式2

    IntelliJ Idea 常用快捷键列表 Ctrl+Shift + Enter,语句完成“!”,否定完成,输入表达式时按 “!”键Ctrl+E,最近的文件Ctrl+Shift+E,最近更改的文件Sh ...