# If folders does not exist will create be related automatically $ gpg --list-keys gpg: directory '/home/ubuntu/.gnupg' created gpg: keybox '/home/ubuntu/.gnupg/pubring.kbx' created gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
$ gpg --list-key
Second, generate GPG key
$ gpg --gen-key gpg (GnuPG) 2.2.19; Copyright (C) 2019 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.
Note: Use "gpg --full-generate-key"for a full featured key generation dialog.
GnuPG needs to construct a user ID to identify your key.
Real name: shenxianpeng Email address: xianpeng.shen@gmail.com You selected this USER-ID: "shenxianpeng <xianpeng.shen@gmail.com>"
Change (N)ame, (E)mail, or (O)kay/(Q)uit? O We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. gpg: key 5F72A7D009FC935A marked as ultimately trusted gpg: directory '/home/ubuntu/.gnupg/openpgp-revocs.d' created gpg: revocation certificate stored as '/home/ubuntu/.gnupg/openpgp-revocs.d/F0F32CB8C65536ECE0187EAD5F72A7D009FC935A.rev' public and secret key created and signed.
# get with your email gpg --armor --export xianpeng.shen@gmail.com # or with your pub key id pg --armor --export F0F32CB8C65536ECE0187EAD5F72A7D009FC935A
# # public key content output below #
Fourth, add the public key content (GPG keys) to GitHub
Open GitHub, Settings -> SSH and GPG keys -> New GPG key
Then when you commit with command git commit -S -m "Your commit message", then a verified signature will show on GitHub
比如设置开发环境不能像 Linux 和 Mac 那样只需要输入一行命令就能安装各种 command 和 package,因此有的程序员从此转到了 Mac 上开发,也有的干脆就使用 Linux 作为开发机,只有那些不得不使用 Windows 作为开发环境程序员还一直留在了 Windows 上继续凑合中。
直到 WSL 的到来,准确来说是 WSL2。
WSL + VS Code + Docker Desktop 这三剑客的组合,开始让我觉得在 Windows 上做开发是一件非常爽的事情。
什么是 WSL
WSL 是 Windows Subsystem for Linux 的缩写,它是 Windows 10 操作系统的一项功能,使你能够在 Windows 上直接运行 Linux 文件系统,以及 Linux 命令行工具和 GUI 应用程序,并与传统的 Windows 桌面和应用程序一起运行。
WSL 的最低版本要求是 Windows 10 version 1903 及更高。
WSL 是专为那些需要使用 Linux 的开发人员所开发的,例如从事网络开发人员、开源项目、以及需要部署到 Linux 服务器环境的开发者。
WSL 适用于喜欢使用 Bash、常用 Linux 工具(sed、awk等)和 Linux 优先框架(Ruby、Python 等),同时也喜欢使用 Windows 作为生产力工具的人。
下面来看看 WSL 和虚拟机相比有哪些优势。
使用 WSL 的几点优势
与完整的虚拟机相比,WSL 需要的资源(CPU、内存和存储)更少
你可以同时使用 Windows 和 Linux,并从 Linux 中访问你的 Windows 文件,有更好的交互体验。
最最重要的是,使用 WSL 结合 VS Code + Docker 既有 Linux 的完美体验感,也同时拥有在 Windows 上的办公生产力。这是虚拟机或是 Linux 操作系统所办不到。Mac 可以,但并不是所有人都适合 Mac。
下面就来说说如何安装 WSL,以及和 VS Code + Docker 进行搭配使用。
安装 WSL
wsl --install
这个命令将启用所需的可选组件,下载最新的 Linux 内核,将 WSL 2 设置为你的默认值,并为你安装一个 Linux 发行版(默认为 Ubuntu)。
# 查看可用的发行版列表 C:\Users\xshen>wsl --list--online The following is a list of valid distributions that can be installed. Install using'wsl --install -d <Distro>'.
NAME FRIENDLY NAME Ubuntu Ubuntu Debian Debian GNU/Linux kali-linux Kali Linux Rolling openSUSE-42 openSUSE Leap 42 SLES-12 SUSE Linux Enterprise Server v12 Ubuntu-16.04 Ubuntu 16.04 LTS Ubuntu-18.04 Ubuntu 18.04 LTS Ubuntu-20.04 Ubuntu 20.04 LTS
ubuntu@CN-L-2680:~$ cd cue/ ubuntu@CN-L-2680:~/cue$ code .
# 只有第一次才会安装 VS Code Server Installing VS Code Server for x64 (dfd34e8260c270da74b5c2d86d61aee4b6d56977) Downloading: 100% Unpacking: 100% Unpacked 2341 files and folders to /home/ubuntu/.vscode-server/bin/dfd34e8260c270da74b5c2d86d61aee4b6d56977.
第一次会自动下载并安装 VS Code Server,安装完成后会自动启动你本机上的 VS Code,并打开了 Ubuntu 上的代码目录,整个过程非常丝滑。
Sometimes, for some reason, there is a problem with your organization’s LDAP server and you can’t log in to Jenkins using LDAP, but you need to use Jenkins now.
You can disable LDAP authentication by changing config.xml.
# Login, cd to jenkins server folder $ cd /var/lib/jenkins/
# Highly rememend you to backup config.xml before making any change !!! # If you don't backup config.xml, you'll lost your LDAP configration after reboot service. $ cp config.xml config.xml.bak
# Modify config.xml from <useSecurity>true</useSecurity> # To <useSecurity>false</useSecurity>
# Restart Jenkins server sudo service jenkins restart
Then you can log into the Jenkins server again.
Once your organization’s LDAP works again, you can replace config.xml with your backup config.xml file. Then your users can continue to log in via LDAP.
Failure: PIP - Pip Inspector The Pip Inspector tree parse failed to produce output.
Overall Status: FAILURE_DETECTOR - Detect had one or more detector failures while extracting dependencies.
For more output please click to expand.
👉 Click to see more output 👈
[main] --- ======== Detect Issues ======== [main] --- [main] --- DETECTORS: [main] --- Detector Issue [main] --- /workdir/test [main] --- Failure: PIP - Pip Inspector [main] --- The Pip Inspector tree parse failed to produce output. [main] --- [main] --- ======== Detect Result ======== [main] --- [main] --- Black Duck Project BOM: https://org.blackducksoftware.com/api/projects/246c8952-7cb8-40e9-9987-35f7d4602ae1/versions/e1cb4204-42d0-4445-8675-978df62b150d/components [main] --- [main] --- ======== Detect Status ======== [main] --- [main] --- GIT: SUCCESS [main] --- PIP: FAILURE [main] --- [main] --- Signature scan / Snippet scan on /workdir/test: SUCCESS [main] --- Overall Status: FAILURE_DETECTOR - Detect had one or more detector failures while extracting dependencies. Check that all projects build and your environment is configured correctly. [main] --- [main] --- If you need help troubleshooting this problem, generate a diagnostic zip file by adding '-d' to the command line, and provide it to Synopsys Technical Support. See 'Diagnostic Mode'in the Detect documentation for more information. [main] --- [main] --- =============================== [main] --- [main] --- Detect duration: 00h 00m 54s 951ms [main] --- Exiting with code 5 - FAILURE_DETECTOR
ENVIRONMENT:
Product: synopsys-detect-7.11.1.jar
Others: OpenJDK 11, Python 3.6 and Python 2.7.5
Root cause
More output of this run, I see it used python (which is python2) not python3, so run pip-inspector.py failed.