当前位置: 首页 > news >正文

git-secret介绍

git-secret介绍

git-secret 是一个与git兼容的命令行工具,旨在安全地存储和管理敏感数据,如源代码中的密码、密钥以及敏感文件。它通过 GPG 加密来保护文件,确保只有授权的用户才能访问这些敏感信息。

使用流程

1、安装 Git-Secret:在本地开发环境中安装 git-secret。
2、生成 GPG 密钥:为每个团队成员生成一对 GPG 公私钥。
3、添加公钥:将团队成员的公钥添加到 git-secret 的钥匙库中。
4、跟踪敏感文件:使用 git-secret add 命令跟踪包含敏感信息的文件。
5、加密文件:运行 git-secret hide 来加密跟踪的文件,使其在仓库中安全存储。
6、推送到远程仓库:将加密后的文件推送到远程 Git 仓库。
7、访问敏感数据:团队成员使用 git-secret reveal 命令解密并访问敏感数据。

micray@localhost:/mnt/d/code/other$ mkdir test-git-secret
micray@localhost:/mnt/d/code/other$ cd test-git-secret/
micray@localhost:/mnt/d/code/other/test-git-secret$ ls
# 生成gpg
micray@localhost:/mnt/d/code/other/test-git-secret$ gpg --list-secret-keys --keyid-format=long
gpg: /home/micray/.gnupg/trustdb.gpg: trustdb createdmicray@localhost:/mnt/d/code/other/test-git-secret$ gpg --full-generate-key
gpg (GnuPG) 2.2.27; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.Please select what kind of key you want:(1) RSA and RSA (default)(2) DSA and Elgamal(3) DSA (sign only)(4) RSA (sign only)(14) Existing key from card
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want?
http://www.lryc.cn/news/459087.html

相关文章:

  • 【实战】Nginx+Lua脚本+Redis 实现自动封禁访问频率过高IP
  • 计算机专业大一课程:线性代数探秘
  • vscode写markdown插入图片视频并放在指定目录
  • 鸿蒙富文本显示
  • 手写mybatis之细化XML语句构建器,完善静态SQL解析
  • 使用Milvus和Llama-agents构建更强大的Agent系统
  • Python 工具库每日推荐【Arrow】
  • Win10 安装 Redis 数据库
  • 使用springboot生成war包
  • 见微知著:OpenEuler系统启动流程
  • 支持向量机-笔记
  • 研发线上事故风险解读之缓存篇
  • JavaScript前端开发技术
  • H.264 编码参数优化策略
  • C++ 游戏开发技术选型指南
  • 基于Python Django的在线考试管理系统
  • 《Java基础》变量和数据类型
  • FLINK内存管理解析,taskmanager、jobmanager
  • 【AI论文精读13】RAG论文综述2(微软亚研院 2409)P5-可解释推理查询L3
  • 优达学城 Generative AI 课程3:Computer Vision and Generative AI
  • UE5 C++ 通过绑定编辑器事件实现控制柄顶点编辑
  • 云计算ftp 服务器实验
  • node.js服务器基础
  • 2-SAT 问题详解:逻辑约束与图论的结合
  • 使用NetTopologySuite读写gpkg文件
  • 什么是http?列出常见方法并解他们?
  • 通过修改注册表来提高导出图像的分辨率(PPT尝试)
  • OpenCV 环境配置
  • 使用通义千问模拟ChatGPT-o1进行思考,并以类似于ChatGPT-o1的形式输出
  • 维生素对于生活的重要性