git lfs下載時出現404 object not found問題

解決方式

  1. 下載mirror git專案
    git clone –mirror <git url>
  2. 找出有問題的object OID
    cd git專案
    git lfs fetch –all
  3. 透過OID,找出有問題的LFS檔案, 並且把檔案名稱都記下來
    git log –all -p -S <OID>
  4. 下載BFG repo cleaner (java 程式)
    https://rtyley.github.io/bfg-repo-cleaner/
  5. 清理檔案
    java -jar bfg.jar –delete-files <file name> <git location : xxx.git>
  6. 重新整理
    cd xxx.git
    git reflog expire –expire=now –all && git gc –prune=now –aggressive
  7. 收工
    git push

零信任不是對你沒有信任的意思 Zero Trust(ZT)

美國國家標準暨技術研究院(NIST), 於2020年8月發表零信任 (SP 800-207) 指導書 , 火速被各大軟體服務商奉為聖旨,
並不是對你沒有信任的意思, 而是任何人做任何事都必須一視同仁, 詳加盤查, 才能信任.

以防火牆來說, 牆內安全, 牆外不安全, 這是以前的思維;
未來上雲端後, 將打破防火牆概念, 任何動作都必須再次檢驗才能過關.

https://csrc.nist.gov/publications/detail/sp/800-207/final

8/13起 github 專案commit要改用token

github 公告 2021/8/13起, 強制改用token的方式, 之前使用密碼的方式不能再用

"Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com."

所以要到個人github上, 生成token, 然後當作密碼使用

https://github.com/settings/tokens

  1. 先產生 token , 將token copy 起來

2. 用戶端輸入帳號,與密碼(此時不要輸入真的密碼, 請輸入token)

nextcloud 綁定ldap, 突然無法登入

nextcloud 綁定公司兩台AD , 一台台北, 一台蘇州 , 兩台不同網域

但是今天發生蘇州網域伺服器停機(停電超過4小時), 居然造成nextcloud所有人員無法登入的情況

查了一下解法, 可以先暫時停用蘇州的ldap連線,

sudo -u www-data php occ ldap:set-config s02 ldapConfigurationActive 0

以下是ldap相關指令, 可以先查詢設定檔案名稱之後, 如s01 , s02 , 再停用連線

ldap
 ldap:check-user               checks whether a user exists on LDAP.
 ldap:create-empty-config      creates an empty LDAP configuration
 ldap:delete-config            deletes an existing LDAP configuration
 ldap:search                   executes a user or group search
 ldap:set-config               modifies an LDAP configuration
 ldap:show-config              shows the LDAP configuration
 ldap:show-remnants            shows which users are not available on
                               LDAP anymore, but have remnants in
                               Nextcloud.
 ldap:test-config              tests an LDAP configuration
1 ... 25 26 27 28 29 ... 77