当前位置:首页 » 密码管理 » 修改git的用户名密码是什么

修改git的用户名密码是什么

发布时间: 2022-07-05 18:42:18

A. TGit里怎么设置SSH密钥和HTTPS用户名密码

1. ssh的认证不要使用Tortoise自带的,一定要使用git的openSSH的方式,这一点很重要。如果你已经指定了Tortoise的方式,那么通过修改环境变量GIT_SSH就可以了,当然重装也是一种办法。
2. 配置时使用git bash来操作。
3. 通过执行
ssh-keygen -t rsa
创建公私钥,文件就保存在~/.ssh/id_rsa下就行了。执行时一路回车就好了。
4. 创建ssh的config文件,如:
vi ~/.ssh/config
内容为:
Host github.com
ProxyCommand ~/.ssh/ssh-https-tunnel %h %p ~/.ssh/proxyauth
Port 443
Hostname ssh.github.com

这里你可以看到第二行最后有一个~/.ssh/proxyauth。这是因为我单位的代理有口令,所以要再生成一个proxyauth文件,格式就是:username:password。如果你没有,去掉它就行了。

同时Hostname的目的是为了创建一个别名,其实我们使用的是ssh.github.com,但是因为平时都使用[email protected],所以为了不进行修改,创建一个别名。
5. 下载ssh-https-tunnel,可以从 http://zwitterion.org/software/ssh-https-tunnel/ssh-https-tunnel ,保存到你的git的~/.ssh目录下
同时要打开这个文件进行修改,将:

my $proxy = "";
my $proxy_port = ;
改成你的实际的代理服务器地址

6. 使用ssh [email protected] 来测试

Hi limodou! You've successfully authenticated, but GitHub does not provide shell
access.
Connection to ssh.github.com closed.

这里的难点一个是代理认证的配置,这是我在网上搜到的。还有就是GIT_SSH的设置。如果安装了TortoiseSVN,选择了ssh客户端,那么有可能ssh的代理设置通过,但是git使用时会出错,因为它会去看环境变量。

B. tortoisegit怎么改用户名密码

可以设置用户名和密码,但是这个只能作为服务端授权, 显示是谁提交的还是由客户端自己设置
我这边是这样的,可能还有服务端指定的方法吧

C. git如何设置账号密码从而每次项目中的组员更新或者提交代码的时候都需要输入账号和密码呢

插入如下代码使项目中的组员每次修改数据都要输入账号和密码:

  • gitconfig--globaluser.name[username]

  • gitconfig--globaluser.password[userpassword]

PS:想要保存密码,则需要插入如下代码:git config –global credential.helper store。

D. git的密码怎么设置

设置git用户名/邮箱
git config --global user.name [username]
git config --global user.email [email]

E. 怎样连接git远程仓库,设置用户名和密码

当使用HTTPS协议推送代码到Git仓库时,发现每次都需要输入密码,操作起来非常麻烦。下面介绍几种免去输入密码的方法。
HTTPS协议推送
使用HTTPS协议,有一种简单粗暴的方式是在远程地址中带上密码。
> git remote set-url origin http://yourname:[email protected]/yourname/project.git

还有一种方法,是创建文件存储Git用户名和密码。
以Windows环境为例,在%USERPROFILE%目录中(一般为C:\Users\yourname),打开Git Bash命令行,创建文件
> touch .git-credentials

在文件中输入仓库域名,这里使用了bitbucket.org。
https://yourname:[email protected]

在CMD终端中设置在全局Git环境中,长期存储密码
> git config --global credential.helper store

其他设置密码方式
记住密码(默认15分钟):git config --global credential.helper cache
自定义存储时间:git config credential.helper 'cache --timeout=3600'
SSH协议推送
如果原来的推送地址协议是HTTPS,可以通过换成SSH协议,在远程仓库添加SSH Key来实现推送时免账户密码输入。
> git remote -v // 查看远程地址
> git remote rm origin // 删除原有的推送地址
> git remote add origin [email protected]:<用户名>/版本库名

或者
> git remote -v
> git remote set-url origin [email protected]:<用户名>/版本库名

执行推送。
> git push -u origin master

发现提示权限不够。
The authenticity of host 'bitbucket.org (104.192.143.1)' can't be established.
RSA key fingerprint is SHA256:.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bitbucket.org,104.192.143.1' (RSA) to the list of kn
own hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

需要在本地创建该帐号的RSA Key。可以参考以下两篇文章:
Windows下配置SSH连接Github
Git如何在本地生成多个SSH key
然后再执行推送。
> git push -u origin master

就可以推送成功了。

F. intellij idea 2016 怎么修改git账号密码

在设置setting里搜索git/github里面有帐号密码信息,直接修改即可。

G. 新浪云的git部署代码,这个用户名和密码是什么,怎么填写都不正确,也没有任何的提示

通过控制台打开要部署代码的应用,通过左侧功能栏:运行环境管理->代码管理

热点内容
安卓手机如何拼照片 发布:2025-05-16 12:58:23 浏览:373
深入浅出python 发布:2025-05-16 12:56:52 浏览:654
国二c语言vc2010怎么编译运行 发布:2025-05-16 12:53:49 浏览:424
华为热点哪里看密码 发布:2025-05-16 12:53:44 浏览:514
新手如何用java写安卓app 发布:2025-05-16 12:53:07 浏览:401
虚荣挂脚本 发布:2025-05-16 12:50:44 浏览:480
Oracle触发器与存储过程高级编程 发布:2025-05-16 12:49:39 浏览:360
伊兰特悦动有什么配置 发布:2025-05-16 12:48:57 浏览:93
超话等待上传 发布:2025-05-16 12:48:56 浏览:259
文件拷贝时缓存大小 发布:2025-05-16 12:47:58 浏览:829