【Azure 应用服务】App Service For Linux 环境中,如何从App Service中获取GitHub私有库(Private Repos)的Deploy Key(RSA key)呢?
2022-03-26 17:18
766 查看
问题描述
为App Service For Linux配置CI/CD,源代码在GitHub私有库中,在发布时候报错 Cannot find SourceControlToken with name Bitbucket. 这样的情况如何来解决呢?在参考了文章
得知需要在GitHub/Bitbucket/GitLab中配置Deploy Key。 那么我们如何来获取这个Key呢?
问题解答
第一步: 在App Service门户的Deployment Center页面获取用户名和密码
第二步: 组合获取 SSH Key 的请求URL
https://<$用户名>:<密码>@<站点名>.scm.chinacloudsites.cn/api/sshkey?ensurePublicKey=1
- <$用户名> : 使用第一步中的UserName代替,注意,只需要 \ 后面的部分,需要包含$符号
- <密码> :第一步截图中的Password内容
- <站点名> :当前Web App的名称
第三步: 通过Postman或者curl 获取到 ssh-rsa Key
curl https://$xxxxx:qr3kuR7ygxxxxxxxxxcDt@xxxxxxx.scm.chinacloudsites.cn/api/sshkey?ensurePublicKey=1
附录一: 如何在App Service for Linux中查看 .ssh 文件夹
登录到SSH页面:https://yourappservicename.scm.chinacloudsites.cn/webssh/host
# find / -name .ssh # cd /home/xxxxxxxxxxxxxxxxxxx??????????????????/.ssh # ls -l
查找截图:
参考文档
1:https://erikschlegel.com/2015/06/20/azure-continuous-deployment-using-git-private-repos/
相关文章推荐
- 【Azure 应用服务】App Service For Linux 如何在 Web 应用实例上住抓取网络日志
- 【Azure 应用服务】App Service For Linux 部署PHP Laravel 项目,如何修改首页路径为 wwwroot\public\index.php
- 【应用服务 App Service】App Service For Linux 中如何挂载一个共享文件夹呢? Mount Azure Storage Account File Share
- 【Azure 应用服务】App Service For Linux 部署Java Spring Boot应用后,查看日志文件时的疑惑
- 【Azure 应用服务】App Service For Linux 中安装paping, 用于验证从App Service向外请求的网络连通性
- 【Azure 应用服务】App Service For Linux 怎么安装Composer,怎么安装PHP扩展,怎么来修改站点根路径启动程序?
- 【Azure 应用服务】App Service for Linux 中实现 WebSocket 功能 (Python SocketIO)
- 【Azure 应用服务】App Service For Windows 中如何设置代理实现前端静态文件和后端Java Spring Boot Jar包
- 【Azure 应用服务】[App Service For Linux(Function) ] Python ModuleNotFoundError: No module named 'MySQLdb'
- 【Azure 应用服务】部署Jar到App Service for Linux,因启动命令路径配置错误而引起:( Application Error 问题
- 【Azure App Service For Container】创建ASP.NET Core Blazor项目并打包为Linux镜像发布到Azure应用服务
- 【Azure 应用服务】App Service多个部署槽(Slot)之间,设置Traffic百分比后,如何来判断请求是由那一个槽(Slot)来进行处理呢?
- 【Azure 应用服务】在Azure App Service for Windows 中部署Java/NodeJS/Python项目时,web.config的配置模板内容
- 【Azure 应用服务】App Service 默认开放端口说明, 如何禁用Web app的端口号?
- 【Azure 应用服务】如何定期自动重启 Azure App Service Plan(应用服务计划)
- 【Azure 应用服务】应用代码需要客户端证书进行验证,部署到App Service后,如何配置让客户端携带证书呢?
- 【Azure 应用服务】如何关掉App Service/Function App的FTP部署, 使之变成FTPS
- 【Azure 应用服务】FTP 部署 Vue 生成的静态文件至 Linux App Service 后,访问App Service URL依旧显示Azure默认页面问题
- 【Azure 应用服务】App Service for Container中配置与ACR(Azure Container Registry)的RABC权限
- 【Azure 应用服务】遇见“无法创建hybrid connection for App Service”的解决办法