git 使用 Google 帐户登录时使用 gitlab 的 https 链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22436827/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Use gitlab's https link when logged in with Google Account
提问by Molten Ice
I've signed up to Gitlab using the connection they have with Google Accounts. Once that is made and I have permission to clone from a git repository, I try to clone using the https:// link (not the git: SSH one)
我已经使用他们与 Google 帐户的连接注册了 Gitlab。一旦完成并且我有权从 git 存储库克隆,我尝试使用 https:// 链接(而不是 git: SSH 链接)进行克隆
Now to complete this process, I am asked my username and password, but what is that in this scenario? Please don't recommend using SSH link instead as ssh is not straightforward on a Windows OS.
现在要完成这个过程,我被问到我的用户名和密码,但在这种情况下是什么?请不要推荐使用 SSH 链接,因为 ssh 在 Windows 操作系统上并不简单。
采纳答案by Vivek
Its very simple
它非常简单
- Login to gitlab (Using OAuth method)
- Go to https://gitlab.com/profile/password/edit
- It asks for New passwordand Password confirmation(If you are registered using OAuth method it will not ask for current password)
- Enter the password you want to set and click Save Passwordbutton
- 登录 gitlab(使用 OAuth 方法)
- 转到https://gitlab.com/profile/password/edit
- 它要求输入新密码和密码确认(如果您使用 OAuth 方法注册,它不会要求输入当前密码)
- 输入您要设置的密码,然后单击“保存密码”按钮
Done! You can now login with your email id and password.
完毕!您现在可以使用您的电子邮件 ID 和密码登录。
回答by Keith Morris
You can actually use the https link if you login using a Google, Twitter or GitHub link but you have to have an actual GitLab password. If you've already created your account by logging in with a social network, all you have to do is use the Forgot Password feature.
如果您使用 Google、Twitter 或 GitHub 链接登录,您实际上可以使用 https 链接,但您必须拥有实际的 GitLab 密码。如果您已经通过社交网络登录创建了您的帐户,您所要做的就是使用忘记密码功能。
- log out and then use the "Forgot your password?" button and put in the email address of the social network you logged in with.
- Once you get the email, "change" your password which will have actually set your GitLab password
- You should now be able to use the https: clone url with your username and the password you just set.
- 注销然后使用“忘记密码?” 按钮并输入您登录的社交网络的电子邮件地址。
- 收到电子邮件后,“更改”您的密码,这将实际设置您的 GitLab 密码
- 您现在应该可以使用 https: clone url 和您刚刚设置的用户名和密码。
回答by Soham Pandya
Go to setting - > passwords -> you can change/create password if you have created account via social media extension (google/twitter/fb) add any password in current password and add & confirm new password.
转到设置-> 密码-> 如果您已通过社交媒体扩展程序(google/twitter/fb)创建帐户,则可以更改/创建密码在当前密码中添加任何密码并添加并确认新密码。
it works for me :)
这个对我有用 :)
回答by michas
Even if you don't want to hear it: use ssh. ;)
即使您不想听到它:使用 ssh。;)
Setting up ssh is not too much work on windows:
在 windows 上设置 ssh 工作量不大:
- Downloadthe putty windows installer and run it to install all putty tools
- Run puttygen to generate a new key, save the private key on your disk
- Run pagent and load that key. (Optionally add pagent to autostart.)
- You might also need to set GIT_SSH=c:\Program Files\Putty\plink.exe
- 下载putty windows installer 并运行它以安装所有 putty 工具
- 运行 puttygen 生成新密钥,将私钥保存在您的磁盘上
- 运行 pagent 并加载该密钥。(可选地添加 pagent 以自动启动。)
- 您可能还需要设置 GIT_SSH=c:\Program Files\Putty\plink.exe
You have to do this only one. Afterwards everything should work without any more work.
你只需要这样做一个。之后,一切都应该可以正常工作,而无需再进行任何工作。
回答by Molten Ice
Another potential solution:
另一个潜在的解决方案:
- Create a new account from scratchon Gitlab cloud
- Go to your profile settings on this new account (your image on top right > Edit Profile Settings)
- On Account tab activate your social account
- 在 Gitlab 云上从头开始创建一个新帐户
- 转到此新帐户的个人资料设置(右上角的图片 > 编辑个人资料设置)
- 在帐户选项卡上激活您的社交帐户
You should now be able to use both your Gmail username and Gitlab password OR your Gitlab username/password.
您现在应该可以同时使用您的 Gmail 用户名和 Gitlab 密码或您的 Gitlab 用户名/密码。