请帮助我修复git配置步骤。
我无法连接到远程git存储库,每次尝试连接到远程裸git存储库时都会出现错误,“似乎不是git存储库”和“无法从远程存储库读取”。
以下是我的配置步骤:-
预置
步骤1- Cygwing配置
Host Configuration of SSH6.提示输入用户名和密码。
步骤2-配置msysgit.
1.安装好后,您现在有2个窗口,我将其命名为1.gitBash(在资源管理器中的文件/文件夹上右击鼠标)和2.启动->程序-> cygwinSSH ->启动Unix。
1. The problem with SSH is that it sets its $HOME environment to the c:\users\ or c:\Documents and Settings\ variable – and GIT looks for authorized\_keys in this folder. Of course, we don’t want this we setup our Server Environment in the C:\DevTools\cygwin\root\Home\.ssh and so we want GIT to look for keys in there.
2. Open Windows Explorer – go into C:\DevTools\cygwin\root\Home\\ and open the .bashrc file using a text editor (Aside: Be sure not to attempt to format this file as it has Unix Encodings NOT Dos encodings – i.e. just open it in a text editor and don’t use another viewer unless you want encoding errors – you don’t need to read the text in this file if you are following these instructions to a tee.)
3. Put the Cursor at the beginning of the .bashrc file and use CTRL+F to find the following text - bashrc file. 4.在文本.bashrc file#之后(在英镑之后加上空格)-粘贴=/c/DevTools/cygwin64 64/home/。
1. Save this file and close it.
2. Copy this file and navigate to your windows assigned home directory (Aside: GIT will still be looking for your path in this directory so we need to set to refer to our C:\DevTools\cygwin\root\home\\directory instead)
3. Paste this in your c:\users\ or c:\Documents and Settings\ – so it now has c:\users\.bashrc for example.
4. Open both a Git Bash and a Unix Bash Shell – Unix Bash shell
5. Type echo $HOME – into both – they should both spit out – /home/
6. If one does not – you need to set it via cmd- export HOME=/c/DevTools/cygwin64/home/
7. Set Following sytem Environment Variable => 1. CYGWIN\_HOME =C:\DevTools\cygwin64\
2. GIT\_SSH=C:\DevTools\TortoiseGit\bin\TortoiseGitPLink.exe
3. Path=C:%CYGWIN\_HOME%\bin C:\DevTools\Git\cmd C:\DevTools\TortoiseGit\bin C:\DevTools\Git\bin
4. SVN\_SSH=C:\DevTools\TortoiseGit\bin\TortoiseGitPLink.exe
步骤3-使用GIT和Plink
!错误信息
发布于 2013-12-27 10:04:08
我做到了!
使用URL:
git push GauravA@192.168.248.58:D:/Git_repo.git在IP地址之后,不需要在URL和端口号开始时使用ssh://。
https://stackoverflow.com/questions/20781431
复制相似问题