嗯...我已经在 Windows\xc2\xa07 上安装了 MinGW32(我不知道版本 - 安装在名为 Git 2.4.4.2 的文件夹中),并且我想安装 ImageMagick 来运行一些脚本,如下所示:
\necho " Creating different dimensions of "$1" ..."\n\nconvert $1 -resize 67% dir1/$1\nconvert $1 -resize 50% dir2/$1\nconvert $1 -resize 33% dir3/$1\nmv $1 dir0/$1\n\necho " Done"\nRun Code Online (Sandbox Code Playgroud)\n据我在谷歌上搜索,没有明确的详细指南如何安装它。我下载了这个ImageMagick版本:ImageMagick-i686-pc-mingw32.tar.gz
\n从官方 ImageMagick 站点指南中,我进入第一步,使用以下命令解压发行版:
\ntar xvzf ImageMagick-i686-pc-mingw32.tar.gz\nRun Code Online (Sandbox Code Playgroud)\n结果我得到了一个文件夹 ImageMagick-6.8.5。\n到目前为止一切顺利。但下一步Next配置并编译ImageMagick:
\ncd ImageMagick-6.8.5\n./configure\nmake\nRun Code Online (Sandbox Code Playgroud)\n我得到bash: ./configure: 没有这样的文件或目录。
\n这是我的照片:
\n\n这是ls -l结果:
我该如何解决这个问题?
\n我只安装了 MinGw32,没有安装 MSYS(正如我在不太详细的指南中读到的那样)。
\n我的计算机运行 Windows 10,启用了开发人员模式并安装了 Linux 子系统。当我切换到 bash 时,我尝试从 git 运行一个简单的克隆命令:
git clone https://github.com/PrivateRepo/my-private-repo.git
Run Code Online (Sandbox Code Playgroud)
当然,我已经稍微删除了此处的 URL,但您已经明白了。最初,我从该命令得到的响应是这样的:
致命:无法访问“ https://github.com/PrivateRepo/my-private-repo.git/ ”:服务器证书验证失败。CA 文件:/etc/ssl/certs/ca-certificates.crt CRL 文件:无
我看到一些 Stack Overflow 答案谈到了这个问题,但说实话,我真的不知道处理该错误的正确方法。话虽如此,我知道一种不正确的方法,那就是通过运行以下命令来完全规避它:
git config --global http.sslverify false
Run Code Online (Sandbox Code Playgroud)
这似乎有效。我关闭所有 SSL 验证可能很糟糕,但我需要让它正常工作,而且这并不是这个问题的重点(我正在讨论)。但顺便说一句,如果你知道解决这个问题的正确方法,我会洗耳恭听。
接下来,我重新运行git clone命令,这一次它提示我输入用户名和密码,但最终由于不同的原因而失败。它看起来是这样的:
git clone https://github.com/PrivateRepo/my-private-repo.git
Cloning into 'my-private-repo'...
Username for 'https://github.com': myuser
Password for 'https://myuser@github.com':
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/PrivateRepo/my-private-repo.git'
Run Code Online (Sandbox Code Playgroud)
不过,我可以向您保证,我输入的用户名和密码都是正确的。我还安装了 Windows 版 Git,当我尝试时一切正常。唯一需要注意的是,它没有在命令行中提示我输入密码,而是打开了一个单独的窗口来输入凭据,并且还要求我提供六位数的 2FA 代码。然后它克隆得很好。我注意到这样做会在 Github 中创建一个个人访问令牌。因此,我继续创建了另一个个人访问令牌,并尝试在 bash 中手动使用它。基本上不是输入myuser我输入的用户名myuser:mytoken
git clone https://github.com/PrivateRepo/my-private-repo.git
Cloning into 'my-private-repo'... …Run Code Online (Sandbox Code Playgroud) linux git github two-factor-authentication windows-subsystem-for-linux
如何使用 Git 来简单地使本地目录与服务器目录保持同步?
我习惯使用 FTP,但它速度慢且容易出错。
我可以通过 SSH 访问服务器。我可以在服务器上运行 Git。
我还想避免使用第三方 Git 托管服务,例如 Github 或 Bitbucket。我希望能够直接上传到我的服务器。
我遇到了这个奇怪的问题,我用我的凭据 ( my_correct@email.adress)克隆了一个存储库。但我无法推送更改,因为我总是收到此消息:
GitLab: You cannot push commits for 'my_wrong@email.adress' . You can only push commits that were committed with one of your own verified emails.
Run Code Online (Sandbox Code Playgroud)
问题是,当我检查全局和存储库用户时,我发现它是my_correct@email.adress:
全球(以下确认我的正确地址):
git git config --global user.email
git config --global user.name
Run Code Online (Sandbox Code Playgroud)
存储库(下面确认我的正确地址):
git git config user.email
git config user.name
Run Code Online (Sandbox Code Playgroud)
我该怎么办,这个神秘的谜团背后的原因是什么?
我在 Reddit 上发现一条评论,建议免费 Git 主机 ProjectLocker 以纯文本形式存储他们的密码。
我不知道
这是否意味着某人很容易进入我的私人代码存储库之一?
我在虚拟机中运行 Windows XP 以执行某些任务。我尝试使用 git 来版本化虚拟框的图像;但是,在所有服务包之后,它大约是6GB。我只有 6GB 的 ram 和 git 炸弹,说它内存不足。
我基本上想要拥有 Windows 的快照,这样我就可以简单地吹走图像并在我想要的时候重新开始。我喜欢在升级不起作用的情况下可以回滚到的东西,所以如果文件系统支持,我更喜欢使用版本控制或快照。
关于我可以使用哪些工具来做到这一点的任何想法?
我的键盘没有~键,Windows 上的 Git Bash 不允许我输入Alt-###组合符号或粘贴它。我该怎么做?
用法
克隆这个仓库(git clone https://github.com/naneau/php-obfuscator)并通过 Composer 安装依赖项(composer install)后,运行以下命令混淆一个目录的 PHP 文件:
来源:https : //github.com/naneau/php-obfuscator
我从来没有用过“git”,“克隆了一个仓库”,而且我没有 GitHub 帐户,也无法注册。我通过“composer install something”使用了无数的库。我从来没有必要“克隆一个存储库”才能让其中的任何一个工作。
“克隆存储库”是什么意思,为什么(显然)需要使用这个特定的库?另外,请注意,作者没有提到在 Composer 中实际调用的库是什么,我觉得这非常奇怪。(他们有时在那里有非常不明显的名字。)
zsh 到处都被推荐使用,并且应该是更先进的 shell 之一。为什么然后我发现 zsh 自动完成功能在我习惯使用 bash 的许多领域都缺乏?
特别是 zsh 中的 git 自动完成非常糟糕:
git ×9
bash ×3
github ×2
windows ×2
autocomplete ×1
binary-files ×1
clone ×1
ftp ×1
gitlab ×1
hosting ×1
imagemagick ×1
linux ×1
mingw ×1
php ×1
repository ×1
security ×1
ssh ×1
sync ×1
windows-subsystem-for-linux ×1
zsh ×1