如何将源代码部署到阿里云centos服务器上

如何将源代码部署到阿里云centos服务器上,第1张

小鸟云服务器niaoyun实例创建好之后,您可以使用以下任意一种方式登录服务器:
远程桌面连接 (Microsoft Terminal Services Client, MSTSC):
采用这种方式登录,请确保实例能访问公网。如果在创建实例时没有购买带宽,则不能使用远程桌面连接。
管理终端 VNC:无论您在创建实例时是否购买了带宽,只要您本地有网页浏览器,都可以通过管理控制台的管理终端登录实例。
使用远程桌面连接 (MSTSC) 登录实例
打开 开始菜单 > 远程桌面连接,或在 开始菜单 > 搜索 中输入 mstsc。也可以使用快捷键 Win+R 来启动运行窗口,输入
mstsc后回车启动远程桌面连接。
在 远程桌面连接 对话框中,输入实例的公网 IP 地址。单击 显示选项。
输入用户名,如小鸟云默认为 niaoyun。单击 允许我保存凭据,然后单击 连接。这样以后登录就不需要手动输入密码了。

小程序代码分为前端和后端。
前端代码:需要用“微信开发者工具”上传至微信官方审核就可以了;
后端代码:代码目录一般放在>有两种方法可以实现的。
第一:通过远程桌面连接来进行文件的传送(管理员才这么 *** 作的)
第二:在服务器上安装一个FZ,开设一个FTP账号,之后通过FTP进行文件上传的(维护人员 *** 作)
如果你 *** 作上面有不懂的,可以在线联系我Q:1606083272

1如何使用Xcode5  SVN从公司服务器 check out项目

Choose Source Control > Check Out

Select the repository you want to check out, and click Next

You can select your repository from the Repositories tab, the Favorites tab, or the Recents tab If you know the location of the repository you want to check out, you can also enter the address manually

If Xcode is unable to automatically identify the trunk and branches, use the browser window to select the correct project location, and click Next

In the Checkout window, select the branches and working copies to check out, and click Next

You will be presented only with the necessary options for your repository If your project contains only one working copy, you will only have to select the branch to checkout If your project doesn’t contain branches, you will only be given an option of working copies to checkout If you project is a single working copy with no branches, this dialog will be skipped entirely

Select the location to store the working copy, and click Check Out

2当有修改时,在Source Control里面可以做点什么,我试了下commit,可以提交到本地,但是没有提交到服务器,中间包括-1012错误,然后配置git用户名跟邮箱。然后填写版本注释,然后就提交,看似提交成功,服务器上却没有。

3Push local changes:我点击了试试,就出来下面这个,我有点疑惑,后来发现人家是

然后我就有点怀疑,难道Xcode自带的SVN的subversion类型不支持提交到服务器这个功能么。

然后看帮助文档,有这么一句。

If you’re using Subversion, a commit operation copies the changes from selected files into the remote Subversion repository Therefore, you must be connected to the repository before you can commit changes (For details, see your repository administrator)

搞了半天不懂 see your repository administrator是什么意思。翻译出来是库管理员。我只想说看他有个毛用。我自能默默自嘲英文差。

4然后我就想着再继续往下看。Updating or Pulling Changes from a Repository

如何更新和提交更改。然后就看到下面的内容。

Update your project with changes from the repository using the Source Control menu

For a Git repository, choose Source Control > Pull

For a Subversion repository, choose Source Control > Update

For a project that contains both Git and Subversion repositories, choose Source Control > Update and Pull

For projects with multiple repositories, select the ones you want to update

Resolve differences by using the left and right buttons to specify which file’s contents to use

After reconciling all differences, click Pull (Git) or Update (SVN) to complete the operation

打开Source Control就没有找到Pull和Update。本来就英文差,他妈的刚巧就认得这几句,然后就此作罢。大牛莫要嘲笑我,还请告知我是哪里出了问题。

看了一个问答,XCODE5中怎么上传到SVN服务器,老外给出的结论是:两个办法,一个是用svn client,客户端软件;另一个方法是命令行。One way is using an svn client The one which is obviously available is the command line svn client

>

但是事情不能不做,就在网上找了命令实验了一下,尽可能写的详细点,下次看的时候好懂。随便帮帮跟我一样正在郁闷的人。

1更改配置(不懂的话就直接跳过吧)

bogon:~ chenshuangchou$ open ~/subversion/config

启动配置文件,然后在配置文件中选择要忽略的文件类型

找到 global-ignores 一行,去掉注释,编辑成

global-ignores = build ~nib so pbxuser mode perspective

# global-ignores = o lo la al libs so so[0-9] a pyc pyo

找到 enable-auto-props = yes 把注释去掉,在[auto-props] Section声明以下文本文件

mode = svn:mime-type=text/X-xcode

pbxuser = svn:mime-type=text/X-xcode

perspective = svn:mime-type=text/X-xcode

pbxproj = svn:mime-type=text/X-xcode

2import命令

首先将本地代码import到版本库

bogon:~ chenshuangchou$ svn import /Users/chenshuangchou/Desktop/BuickIOS/Buickhousekeeper  >

3checkout命令

然后从版本库checkout出来,这个目录就相当于被激活,内部跟服务器地址关联。

bogon:~ chenshuangchou$svn checkout >

4add命令

当有新增的文件时用add指令,增加到版本库,然后提交

svn add /Users/chenshuangchou/Desktop/BuickIOS/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

执行这条指令的前提是/Users/chenshuangchou/Desktop/BuickIOS/是从服务器checkout下来的目录,也就是is a working copy

新增成功的话会有

A  (bin)  Desktop/BuickIOS/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

5commit命令

提交内容到版本库

bogon:~ chenshuangchou$ svn commit -m "添加了一个油耗柱状图" /Users/chenshuangchou/Desktop/BuickIOS/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

提交到版本库成功的话,

Adding  (bin)  Desktop/BuickIOS/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

Transmitting file data

Committed revision 3

6update命令

更新版本库到本地,更新指定目录,svn update如果后面没有目录,默认将当前目录以及子目录下的所有文件都更新到最新版本。

bogon:~ chenshuangchou$ svn update /Users/chenshuangchou/Desktop/BuickIOS1

更新成功

Updating 'Desktop/BuickIOS1':

A    Desktop/BuickIOS1/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

Updated to revision 3

回退到版本2:

bogon:~ chenshuangchou$ svn update -r 2 Desktop/BuickIOS1/

回退成功的话

Updating 'Desktop/BuickIOS1':

D    Desktop/BuickIOS1/Buickhousekeeper/ViewControllers/CarViewController/FuelManageViewController/lastmouth_color1png

Updated to revision 2

冲突

(更新,于版本库同步。如果在提交的时候提示过期的话,是因为冲突,需要先update,修改文件 ,然后清除svn resolved,最后再提交commit)

在提交时发生版本冲突会怎么样

bogon:~ chenshuangchou$ svn commit -m "在delegate中加入了一句话" /Users/chenshuangchou/Desktop/BuickIOS/

Sending        Desktop/BuickIOS/git/index

Sending        Desktop/BuickIOS/Buickhousekeeper/AppDelegateh

Sending       Desktop/BuickIOS/Buickhousekeeperxcodeproj/projectxcworkspace/xcuserdata/chenshuangchouxcuserdatad/UserInterfaceStatexcuserstate

Transmitting file data

Committed revision 4

bogon:~ chenshuangchou$ svn commit -m "在delegate中加入了一句不同的话" /Users/chenshuangchou/Desktop/BuickIOS1/

Sending        Desktop/BuickIOS1/git/index

svn: E160042: Commit failed (details follow):

svn: E160042: File or directory 'git/index' is out of date; try updating

svn: E160024: resource out of date; try updating

out   of  date表示版本过期,可能是由于另外的开发者更新了服务器版本,而本地代码与服务器冲突

遇到这种情况,应该先从服务器update一下,然后再提交

bogon:~ chenshuangchou$ svn update  Desktop/BuickIOS1/

Updating 'Desktop/BuickIOS1':

Conflict discovered in '/Users/chenshuangchou/Desktop/BuickIOS1/git/index'

Select: (p) postpone,

(mf) mine-full, (tf) theirs-full,

(s) show all options:

在这里会有一个选择,选择(s)会显示所有选项的所有注释,如下

(s)  show all    - show this list

(e)  edit             - change merged file in an editor

(df) diff-full        - show all changes made to merged file

(r)  resolved         - accept merged version of file

(dc) display-conflict - show all conflicts (ignoring merged version)

(mc) mine-conflict    - accept my version for all conflicts (same)

(tc) theirs-conflict  - accept their version for all conflicts (same)

(p) postpone  - mark the conflict to be resolved later。

(mf) mine-full  - accept my version of entire file (even non-conflicts)

(tf) theirs-full      - accept their version of entire file (same)

选择一个之后会继续显示冲突点,直到完。而每一个点都会询问怎么处理。

G   Desktop/BuickIOS1/Buickhousekeeperxcodeproj/projectxcworkspace/xcuserdata/chenshuangchouxcuserdatad/UserInterfaceStatexcuserstate

Conflict discovered in '/Users/chenshuangchou/Desktop/BuickIOS1/Buickhousekeeper/AppDelegateh'

Select: (p) postpone, (df) diff-full, (e) edit,

(mc) mine-conflict, (tc) theirs-conflict,

(s) show all options: tf

G    Desktop/BuickIOS1/Buickhousekeeper/AppDelegateh

Updated to revision 4


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/12653396.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-27
下一篇 2023-05-27

发表评论

登录后才能评论

评论列表(0条)

保存