• 每天进步一点点!

文章分类

推荐网站

常用手册

git免密码pull和push【原创】

git免密码pull和push可以用生成秘钥和公钥的方法,也可以用下面的方法,但下面的方法有个缺陷,就是git的用户名和密码是明文的,只有在安全度要求不高的情况下使用

新建文件夹:

weijinbu

进入weijinbu文件夹,然后执行

git init

这时会在weijinbu目录下生成一个.git的文件夹,进入.git文件夹

编辑config文件

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
        url = https://weijinbu:zhangsan@bitbucket.org/weijinbu/weijinbu.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

 

第9行中 weijinbu:zhangsan 冒号前面是用户名,后面是密码

然后执行

git pull

git fetch 

拉去仓库代码

类别:工具配置 | 浏览(81) | 评论(1) | 阅读全文>>

windows7 命令行提示符下解决UTF8 乱码【原创】

windows7 命令行提示符下解决UTF8 乱码:

chcp 65001

上面的命令是将命令行提示符的默认页切换到UTF8,默认是中文简体,切换到UTF8后就可以正常显示UTF8的字符了

类别:工具配置 | 浏览(62) | 评论(0) | 阅读全文>>

Jetbrains IDE 历史版本下载地址【原创】

类别:工具配置 | 浏览(92) | 评论(0) | 阅读全文>>

ubuntu安装phpmyadmin【原创】

ubuntu下没有比较好用的Mysql的GUI客户端,所以安装了phpmyadmin,安装步骤如下:

sudo apt-get install -y phpmyadmin

这时在地址栏里输入http://localhost/phpmyadmin/回车,会发现浏览器一片空白,这时需要修改一些目录的权限,如下:

sudo chown -R www-data:www-data /etc/phpmyadmin/
sudo chown -R www-data:www-data /usr/share/phpmyadmin/
sudo chown -R www-data:www-data /var/lib/phpmyadmin/

注:www-data:www-data是apache的用户和组

 

phpmyadmin有三种认证方式config,cookie和http,在cookie和http都需要输入密码,config方式是把用户名和密码写入配置文件,登录时无需输入用户名和密码,直接就可以登录,config的认证方式适合本地phpmyadmin用。

下面是config方式认证的部分配置文件(config.inc.php):

$dbname = 'yourip';
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'youruser';
$cfg['Servers'][$i]['password'] = 'yourpassword';
/* Server parameters */
$cfg['Servers'][$i]['host'] = $dbname;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* Optional: User for advanced features */
 $cfg['Servers'][$i]['controluser'] = 'pma';
 $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Optional: Advanced phpMyAdmin features */
 $cfg['Servers'][$i]['pmadb'] = $dbname;
 $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
 $cfg['Servers'][$i]['relation'] = 'pma_relation';
 $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
 $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
 $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
 $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
 $cfg['Servers'][$i]['history'] = 'pma_history';
 $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
/* Uncomment the following to enable logging in to passwordless accounts,
 * after taking note of the associated security risks. */
 $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
$i++;

 

类别:工具配置 | 浏览(109) | 评论(0) | 阅读全文>>

git 出错unable to auto-detect email address【转载】

出错原因:git需要一个默认的邮箱和用户名,而刚安装的git并没有进行配置。

解决办法:打开终端,输入下面的两条命令

git config --global user.email "you@example.com"
git config --global user.name "Your Name"


 

类别:工具配置 | 浏览(851) | 评论(0) | 阅读全文>>