<commit_before>#!/bin/bash

user=`whoami`
if [ "$user"x = "root"x ]
then
    echo "the current user is root. please change to normal user."
    exit
fi

# 查看是否已经存在密钥对
echo "ls -al ~:"

ls -al ${HOME}

echo -e "确认生成ssh密钥对?[y/N] \c"
read ans

if [ "$ans"x = "n"x -o "$ans"x = "N"x ] 
then
    echo "use existed ssh key pair!"
else
    # 创建密钥对
    ssh-keygen -t rsa -C "<EMAIL>"
fi

# 将密钥对加入ssh-agent
echo "将密钥对加入ssh-agent"

ssh-agent bash
ssh-add ~/.ssh/id_rsa

echo "请将公钥 ~/.ssh/id_rsa.pub 中的内容拷贝到github服务器上"
read ans

echo -e "press any key to continue...\c"
read ans


# 测试
echo "testing ssh to github..."
ssh -T git@github.com
echo "done!"
<commit_msg>test create_ssh_3<commit_after>#!/bin/bash

user=`whoami`
if [ "$user"x = "root"x ]
then
    echo "the current user is root. please change to normal user."
    exit
fi

# 查看是否已经存在密钥对
echo "ls -al ~:"

ls -al ${HOME}

echo -e "确认生成ssh密钥对?[y/N] \c"
read ans

if [ "$ans"x = "n"x -o "$ans"x = "N"x ] 
then
    echo "use existed ssh key pair!"
else
    # 创建密钥对
    ssh-keygen -t rsa -C "<EMAIL>"
fi

# 将密钥对加入ssh-agent
echo "请新建一个ssh连接，执行以下命令，将密钥对加入ssh-agent"
echo "ssh-agent bash"
echo "sh-add ~/.ssh/id_rsa"

echo "请将公钥 ~/.ssh/id_rsa.pub 中的内容拷贝到github服务器上"
read ans

echo -e "press any key to continue...\c"
read ans

# 测试
echo "testing ssh to github..."
ssh -T git@github.com

# config git
cmd="git config --global user.name 'jeremy'"
echo ${cmd}
eval ${cmd}

cmd="git config --global user.email <EMAIL>"
echo ${cmd}
eval ${cmd}

echo "done!"

{'fraction_non_alphanumeric': 0.16120401337792642, 'fraction_numerical': 0.0006688963210702341, 'mean_word_length': 3.1555555555555554, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4790874', 'n_tokens_mistral': 727, 'n_tokens_neox': 745, 'n_words': 195}