User Tools

Site Tools


сервис_git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_git [2026/02/25 22:17]
val [Удаление чувствительных данных (паролей, ключей) из репозитория]
сервис_git [2026/03/19 14:05] (current)
val [Работа с локальным репозиторием]
Line 32: Line 32:
  
 server:​~/​conf$ git init server:​~/​conf$ git init
 +
 +server:​~/​conf$ cat .gitignore
 +__pycache__/​
  
 server:​~/​conf$ git add . server:​~/​conf$ git add .
Line 45: Line 48:
  
 server:​~/​conf$ git status server:​~/​conf$ git status
 +
 +server:​~/​conf$ ###git restore file1
  
 server:​~/​conf$ git add -v . server:​~/​conf$ git add -v .
Line 300: Line 305:
  
 (venv1) server:​~/​kubespray#​ git checkout tags/​v2.26.0 (venv1) server:​~/​kubespray#​ git checkout tags/​v2.26.0
 +</​code>​
 +
 +===== Поиск чувствительных данных (паролей,​ ключей) в репозитории =====
 +
 +  * [[https://​www.reddit.com/​r/​git/​comments/​o7jaau/​how_to_scan_for_secrets_on_git_repositories/​]]
 +<​code>​
 +~/openvpn1# git rev-list --all | while read commit_hash;​ do
 +    git grep pass $commit_hash | cat
 +done
 +</​code>​
 +  * https://​github.com/​trufflesecurity/​trufflehog
 +<​code>​
 +~# wget https://​github.com/​trufflesecurity/​trufflehog/​releases/​download/​v3.93.6/​trufflehog_3.93.6_linux_amd64.tar.gz
 +
 +~# tar -xvf trufflehog_3.93.6_linux_amd64.tar.gz trufflehog
 +
 +~# mv trufflehog /​usr/​local/​bin/​
 +
 +~# trufflehog git https://​server.corp13.un:​4443/​student/​openvpn1.git
 +
 +~# ###​trufflehog git file://​openvpn1
 </​code>​ </​code>​
  
сервис_git.1772047037.txt.gz · Last modified: 2026/02/25 22:17 by val