如何解决快捷应用 hello-world 中的“发布命令失败”?

如何解决快捷应用 hello-world 中的“发布命令失败”?

我是 Ubuntu 新手,也是编程新手。我观看了http://developer.ubuntu.com/get-started/视频让这一切看起来如此简单。我按照所有步骤操作,一切都很顺利,直到我尝试发布该应用程序,如视频中所示。

我确信我不是唯一一个遇到此错误的人。请告诉我如何修复此错误。

这是我收到的错误。(我已从错误消息中删除了我的姓名和电子邮件地址。)

user@ubuntu:~/hello-world$ quickly release
Get Launchpad Settings
Launchpad connection is ok
...........Ubuntu packaging created in debian/
.........pushing to launchpad
..................
You need a passphrase to unlock the secret key for
user: "user "
2048-bit RSA key, ID F89E77C4, created 2012-04-27

......
You need a passphrase to unlock the secret key for
user: "user "
2048-bit RSA key, ID F89E77C4, created 2012-04-27

......Checking signature on .changes
gpg: Signature made Fri 27 Apr 2012 10:24:56 PM EDT using RSA key ID F89E77C4
gpg: Good signature from "user "
Good signature on ../hello-world_12.04.9_source.changes.
Checking signature on .dsc
gpg: Signature made Fri 27 Apr 2012 10:24:55 PM EDT using RSA key ID F89E77C4
gpg: Good signature from "user "
Good signature on ../hello-world_12.04.9.dsc.
Uploading to ppa (via ftp to ppa.launchpad.net):
Uploading hello-world_12.04.9.dsc: done.
Uploading hello-world_12.04.9.tar.gz: done.
Uploading hello-world_12.04.9_source.changes: done.
Successfully uploaded packages.
Traceback (most recent call last):
File "/usr/share/quickly/templates/ubuntu-application/release.py", line 287, in
release_version), changelog)
File "/usr/share/quickly/templates/ubuntu-application/internal/launchpad_helper.py", line 57, in push_tarball_to_launchpad
release = create_release(project, version)
File "/usr/share/quickly/templates/ubuntu-application/internal/launchpad_helper.py", line 44, in create_release
date_targeted=release_date)
File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/resource.py", line 573, in call
url, in_representation, http_method, extra_headers=extra_headers)
File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/_browser.py", line 281, in _request
raise error
lazr.restfulclient.errors.Unauthorized: HTTP Error 401: Unauthorized
Response headers:

-content-encoding: gzip
content-length: 65
content-type: text/plain
date: Sat, 28 Apr 2012 02:25:01 GMT
server: zope.server.http (HTTP)
status: 401
strict-transport-security: max-age=2592000
vary: Accept,Accept-Encoding
via: 1.1 api.launchpad.net
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-lazr-notifications: []
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-xss-protection: 1; mode=block
Response body:
(, 'newMilestone', 'launchpad.Edit')

ERROR: release command failed
Aborting 

答案1

当我在我的系统(版本 12,94-0ubuntu1)上快速运行时,它会在我输入命令后立即要求输入 Launchpad 项目名称quickly release。我发现您的版本没有这样做,因此快速可能会尝试将您的版本上传到 launchpad.net/hello-world(除非您已经快速配置为使用不同的 launchpad 项目名称)。

如果项目名称仍为 hello-world,则无法上传,因为已有一个同名项目,而您不属于控制该项目的组。这可以解释消息:lazr.restfulclient.errors.Unauthorized: HTTP Error 401: Unauthorized。在这种情况下,您应该重新开始使用唯一名称重命名程序,或者更简单地使用命令quickly configure lp-project在启动板上提供您自己的项目的名称。

如果您已经使用自己的启动板项目名称进行了快速配置,请确保该项目在启动板上已存在于您的所有权下,并请编辑您的问题以提及项目名称。

尽管如此,程序不应该因回溯而中止,所以这仍然是一个错误。请向 launchpad 报告。

相关内容