码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • git操作将本地的代码推送到远程仓库


    git操作将本地的代码推送到gitlab

    报错:
    1:git remote add origin https://git.stargraph.cn/ed/be/gs_project/shudian-vp.git
    $ git remote add origin https://git.stargraph.cn/ed/be/gs_project/shudian-vp.git
    fatal: remote origin already exists.
    原因一:远程仓库已存在,则需要删除
    git remote -v 查看远程库信息:
    git remote rm origin(删除关联的origin的远程库)
    原因二:代码目录有.git文件和gitconfig文件删除
    2:git add .
    $ git remote add origin https://git.stargraph.cn/ed/be/gs_project/shudian-vp.git
    fatal: not a git repository (or any of the parent directories): .git
    需要git init
    3:
    $ git push -u origin master
    error: src refspec master does not match any.
    error: failed to push some refs to 'https://git.stargraph.cn/ed/be/gs_project/shudian-vp.git'
    这里需要先: git commit -m "first commit"


    4:remote: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password. See https://git.stargraph.cn/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied
    fatal: Authentication failed for 'https://git.stargraph.cn/ed/be/gs_project/shudian-vp.git/'
    这里需要修改本地电脑的git仓库的凭证
    控制面板-凭证管理器-windows凭证-找到对应的git地址编辑账号密码即可

    5:git push -u origin master

    最后推送报错fatal: The remote end hung up unexpectedly,经排查是因为打包的时候target有jar包导致上传文件过大删除即可

  • 相关阅读:
    【SpringCloud微服务实战09】Elasticsearch 搜索引擎
    前端国内镜像环境安装网址
    【uniapp】小程序中input输入框的placeholder-class不生效以及解决办法
    自动化测试中临时数据如何保存 ?这里提供一个简单又好用的第三方包 ,可以放弃redis了。
    可观测性数据收集集大成者 Vector 介绍
    自研一个简易版本的OkHTTP
    电脑入门:如何进入路由器(TP-LINK,PPPoE)设置界面
    五步走,轻松拥有你的个性化小程序
    基于Java+SpringBoot+vue+elementui农产品物流系统详细设计实现
    pom.xml
  • 原文地址:https://blog.csdn.net/weixin_43152758/article/details/133631443
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号