2024年12月4日星期三 上午1:26:37

git Sharing your configuration on GitHub

4 个月 前
#42448 引用
sudo git log
sudo git reset --mixed 592cc918b20be8d4af4bf4473c4cda9abc1df795
0
4 个月 前
#42449 引用
sudo git push -u origin main
To https://github.com/mslycn/homeassistant20221103.git
! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/mslycn/homeassistant20221103.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
 sudo git push -fu origin main

Enumerating objects: 103, done.
Counting objects: 100% (103/103), done.
Delta compression using up to 4 threads
Compressing objects: 100% (55/55), done.
Writing objects: 100% (57/57), 378.92 KiB | 294.00 KiB/s, done.
Total 57 (delta 40), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (40/40), completed with 38 local objects.
To https://github.com/mslycn/homeassistant20221103.git
+ a66315b...a4037e8 main -> main (forced update)
branch 'main' set up to track 'origin/main'.
0
4 个月 前
#43465 引用
20240715

换了路由器

error

:/data $ sudo git push -u origin main
fatal: Authentication failed for 'https://github.com/mslycn/homeassistant20221103.git/'




https://blog.csdn.net/m0_73156359/article/details/135585372
0
4 个月 前
#43466 引用
202408
方法一:不删除远程仓库修改(最方便)
# 查看远端地址
git remote -v  
# 查看远端仓库名
git remote
# 重新设置远程仓库
git remote set-url origin https://gitee.com/xx/xx.git (新地址)


git remote set-url origin [email protected]:user/repo.git

/data $ git remote -v
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (fetch)
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (push)


/data $ git remote -v
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (fetch)
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (push)

[code]/data $ git remote -v
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (fetch)
origin  https://mslycn:[email protected]/mslycn/homeassistant20221103.git (push)


[/code]

sudo git remote set-url origin https://mslycn:[email protected]/mslycn/homeassistant20221103.git
0
4 个月 前
#43467 引用
202410 remote: Write access to repository not granted.

New personal access token (classic)

生产token时需选择
Select scopes
勾选 write:packages  选项

Settings
/
Developer Settings
Personal access tokens (classic)


https://blog.csdn.net/doggege/article/details/124698914
0
3 周 前
#47746 引用
202411  pi

$ cd /data

sudo git add .

udo git add .
fatal: detected dubious ownership in repository at '/data'
To add an exception for this directory, call:

  git config --global --add safe.directory /data


sudo git commit -m "all commit"
sudo git push -u origin main
:/data# sudo git push -u origin main
branch 'main' set up to track 'origin/main'.
Everything up-to-date


0