zoukankan      html  css  js  c++  java
  • 设置ssh key后push为什么还要输入用户名和密码

    $ git push Username for 'https://github.com': Password for 'https://Username@github.com': Counting objects: 562, done. Delta compression using up to 4 threads. Compressing objects: 100% (542/542), done. Writing objects: 100% (561/561), 2.51 MiB | 69.00 KiB/s, done. Total 561 (delta 79), reused 0 (delta 0)

    因为你用的是https而不是ssh。 你可以更新一下origin

    git remote remove origin
    git remote add origin git@github.com:Username/Your_Repo_Name.git
    

    之后你还需要重新设置track branch,比如:

    git branch --set-upstream-to=origin/master master
    

    对于HTTPS方式,你可以在~/.netrc文件里设定用户名密码,不过这样的风险在于密码是明文存放在这个文件里的,比较容易泄露

    machine github.com
    login Username
    password Password
    
  • 相关阅读:
    隔行扫描 和 逐行扫描
    CSS3--关于z-index不生效问题
    vue与其他框架对比
    跨域(转)
    vue 事件修饰符(阻止默认行为和事件冒泡)
    vue 3.0新特性
    bash leetcode
    数据库
    css排版
    盒模型
  • 原文地址:https://www.cnblogs.com/wicub/p/6437994.html
Copyright © 2011-2022 走看看