create account

GitHub设置ssh免用户名和密码push by cameron.barnes

View this thread on: hive.blogpeakd.comecency.com
· @cameron.barnes ·
$2.66
GitHub设置ssh免用户名和密码push
GitHub设置ssh免用户名和密码push

从github上 clone项目后,想提交修改,需要具有提交权限。

但在自己的fork项目上,添加ssh认证后,发现push还要输入用户名和密码。

原来clone的时候,使用的是https,而不是ssh。
```
$ cat .git/config 
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/userxxx/projectyyy
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
```

需要更新一下origin为ssh方式。
```
$ git remote remove origin
$ git remote add origin git@github.com:userxxx/projectyyy.git
$ cat .git/config 
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[branch "master"]
[remote "origin"]
    url = git@github.com:userxxx/projectyyy.git
    fetch = +refs/heads/*:refs/remotes/origin/*
```

重新设置track branch
```
$ git pull origin master
$ git branch --set-upstream-to=origin/master master
```


再重新提交
`git push origin master`
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 63 others
properties (23)
authorcameron.barnes
permlinkgithub-ssh-push-20200318
categoryhive-132971
json_metadata"{"app": "beem/0.20.23", "links": ["https://github.com/userxxx/projectyyy"], "tags": ["hive-132971", "cn", "mini", "jjm", "cn-reader", "esteem", "steemleo", "zzan", "hive-143316", "cn-curation", "sct", "dblog", "whalepower", "actnearn", "neoxian", "palnet", "upfundme", "lassecash", "lifestyle", "mediaofficials", "busy", "wherein", "steempreak", "cn-marlians"]}"
created2020-03-17 16:09:33
last_update2020-03-17 16:09:33
depth0
children1
last_payout2020-03-24 16:09:33
cashout_time1969-12-31 23:59:59
total_payout_value1.384 HBD
curator_payout_value1.278 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length950
author_reputation2,927,734,851,797
root_titleGitHub设置ssh免用户名和密码push
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,439,541
net_rshares10,718,491,167,879
author_curate_reward""
vote details (127)
@florianopolis ·
He said, ***'Stop doing wrong things and turn back to God! The kingdom of heaven is almost here.***'(Matthew 3:2) 
##  *Bro. Eli Challenges Atheism Belief, There is No God*
Watch the Video below to know the Answer...
***(Sorry for sending this comment. We are not looking for our self profit, our intentions is to preach the words of God in any means possible.)***
https://youtu.be/QqkuNRO4Bt4
Comment what you understand of our Youtube Video to receive our full votes. We have 30,000 #SteemPower. It's our little way to **Thank you, our beloved friend.**  
Check our [Discord Chat](https://discord.gg/vzHFNd6) 
Join our Official Community: https://steemit.com/created/hive-182074
👍  
properties (23)
authorflorianopolis
permlink2r19hi1hctr
categoryhive-132971
json_metadata""
created2020-03-17 16:17:48
last_update2020-03-17 16:17:48
depth1
children0
last_payout2020-03-24 16:17:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length682
author_reputation-5,988,767,749,052
root_titleGitHub设置ssh免用户名和密码push
beneficiaries[]
max_accepted_payout10,000.000 HBD
percent_hbd100
post_id96,439,718
net_rshares1,087,018,137
author_curate_reward""
vote details (1)