Bitbucket默认存储库未配置

本文关键字:配置 存储 默认 Bitbucket | 更新日期: 2023-09-27 18:10:55

我完全迷失在这里,因为我一直试图创建一个存储库,并将我现有的Unity3D c#项目推到它。

当前输出为:

realm: Bitbucket.org HTTP
user: 
password: 
warning: bitbucket.org certificate with fingerprint 46:de:34:e7:9b:18:cd:7f:ae:fd:8b:e3:bc:f4:1a:5e:38:d7:ac:24 not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 46:de:34:e7:9b:18:cd:7f:ae:fd:8b:e3:bc:f4:1a:5e:38:d7:ac:24 not verified (check hostfingerprints or web.cacerts config setting) 
searching for changes
warning: bitbucket.org certificate with fingerprint 46:de:34:e7:9b:18:cd:7f:ae:fd:8b:e3:bc:f4:1a:5e:38:d7:ac:24 not verified (check hostfingerprints or web.cacerts config setting)
warning: bitbucket.org certificate with fingerprint 46:de:34:e7:9b:18:cd:7f:ae:fd:8b:e3:bc:f4:1a:5e:38:d7:ac:24 not verified (check hostfingerprints or web.cacerts config setting)
abort: error: ''
Peters-iMac:myProject Peter$ hp puch -v --debug
-bash: hp: command not found
Peters-iMac:myProject Peter$ hg push -v --debug
pushing to default-push
abort: default repository not configured!
(see the "path" section in "hg help config")
Peters-iMac:myProject Peter$ 

我一直试图了解我需要做什么来解决这个问题,但没有成功,我确实检查了"hg帮助配置",但无论如何都没有完全理解。

谁能给盲人(我)带路?

Bitbucket默认存储库未配置

您需要告诉mercurial要推送到哪里。有两种方法:

  1. 命令行:hg push URL,其中URL是要推送到的路径,例如hg push https://bitbucket.org/YOURLOGIN/YOURREPOSITORY(然后它会在命令行上要求登录和pw)

  2. 在.hg/hgrc中找到的存储库配置文件:

    (路径)default = https://bitbucket.org/YOURLOGIN/YOURREPOSITORY

参见hg help config.paths

您还可以使用hgrc来存储登录信息,以便在每次推送时不需要输入这些信息,但这是不安全的。最好使用ssh身份验证,它不需要存储任何凭据。